def calculate_Lanterns(n,m,k):
    lanterns_horizontal=n//k 
    lanterns_vertical=m//k 
    if n %k !=0:
        lanterns_horizontal +=1 
    if m %k !=0:
        lanterns_vertical +=1 
    return lanterns_horizontal* lanterns_vertical
n,m,k=map(int,input().split())
result=calculate_Lanterns (n,m,k)
print(result)
