import math
a =input()
a=a.split()
if int(a[0])<=10e9 and int(a[0])>=1 and int(a[1])<=10e9 and int(a[1])>=1 and int(a[2])<=10e9 and int(a[2])>=1:  
    b= int(a[0])/int(a[2])
    c= int(a[1])/int(a[2])
    b= math.ceil(b)
    c=math.ceil(c)
    print(b * c)
else:
    print('b')

