def calculate_lamps(m, n, k):
    rows = m // k
    cols = n // k
    if m % k != 0:
        rows += 1
    if n % k != 0:
        cols += 1
    total_lamps = rows * cols
    return total_lamps
m = int(input())
n = int(input())
k = int(input())
result = calculate_lamps(m, n, k)
print(result)