"""n = input()
res = ""
for i in n:
    match (i):
        case "2":
            res += "5"
        case "5":
            res += "2"
        case "0":
            break
        case _:
            res += i

print(res[::-1])"""
from math import ceil
n, m, k = map(float, input().split())

print(ceil(n / k) * ceil(m / k))