# import sys
# import os
# import io
#
# input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
# output = sys.stdout.buffer.write
# def print(*values, sep=' ', end='\n'):
#     output(sep.join(str(value) for value in values).encode())

n, m, k = map(int, input().split())
n1 = n // k + 1 if n % k else n // k
m1 = m // k + 1 if m % k else m // k
print(n1 * m1)
