# 가로 길이, 세로 길이를 각각 n으로 나눈 후 올림해서 곱하면 끝 import math as m r,c,n = map(int, input().split()) print(int(m.ceil(r/n)*m.ceil(c/n)))