0.3 Optimal Flagstone Paving
(RankList for this Question)
Score: 10pts
Time Limit: 2.00 sec
In the bustling city of Urbana, the Plaza Promenade takes the shape of a rectangular area measuring n × m meters. To commemorate a special occasion, the city plans to adorn the plaza with square granite flagstones, each having sides of length a × a meters.

While exceeding the boundaries of the Plaza Promenade is acceptable, the entire plaza must be covered using complete flagstones. What is the smallest possible number of flagstones needed to accomplish this paving task?

Constraints have been provided in the Input format

Input Format
The input contains three positive integer numbers in the first line: n,  m and a (1 ≤  n, m, a ≤ 10^9)

Output Format
Write the needed number of flagstones.

Example 1
6 6 4


Example is self explanatory

Log In to solve the Question