__author__ = 'shukkkur'


'''
https://codeforces.com/problemset/problem/1/A
'''


from math import ceil

n,m, a = map(int, input().split())

print(ceil(n/a) * ceil(m/a)

__author__ = 'shukkkur'


'''
https://codeforces.com/problemset/problem/1/A
'''


from math import ceil

n,m, a = map(int, input().split())

print(ceil(n/a) * ceil(m/a)

https://codeforces.com/problemset/problem/1/A