def calculate_lamps(n, m, k):
    lamps_width = (m + k - 1) // k
    lamps_length = (n + k - 1) // k
    return lamps_width * lamps_length

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