PP1 and a bit more
The square in Vasya's hometown is a rectangle of n × m meters. On the occasion of the city's anniversary, it was decided to pave the square with granite slabs. Each plate has a size of k × k meters. The anniversary is very close, but the workers were still unable to determine what is the least number of slabs would be needed to pave the square. Vasya immediately came up with a solution for this task. And can you think of it?
It is allowed to cover with plates the surface larger than the area of a square, but the area itself must be totally covered. Granite slabs can not be broken or crushed, they can only be used as a whole. The boundaries of the plates should be parallel to the boundaries of the area.
Three integers n, m, k (1 ≤ n, m, k ≤ 1000).
Print the minimum number of slabs that will be required to pave the area in accordance with the requirements described.
3 2 2
2 2 3