p, t, k = map(int, input().split())

n_p = p // k
n_t = t // k

n_lights = n_p * n_t

if p % k != 0:
    n_lights += n_t

if t % k != 0:
    n_lights += n_p

if p % k != 0 and t % k != 0:
    n_lights += 1

print(n_lights)
