
def square(a,b,p):
    sum1 = 0
    sum2 = 0
    while a > 0:
        a=a-p
        sum1 += 1
    while b > 0:
        b = b-p 
        sum2 += 1

    return sum1*sum2

m,n,k = map(int,input().split())

print(square(m,n,k))
