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

def min_lights(n, m, k):
    if not (1 <= n <= 10**9 and 1 <= m <= 10**9 and 1 <= k <= 10**9):
        return "Ошибка"
    return math.ceil(n/k) * math.ceil(m/k)

print(min_lights(n, m, k))