0.5 Great Garden Mosaic Challenge
In the charming village of Rosewood, the Community Garden Center boasts a rectangular courtyard measuring
n × m meters. To celebrate the village's centennial, the garden club decides to create a stunning mosaic using square ceramic tiles, each measuring a × a meters.
While it's acceptable for the mosaic to extend slightly beyond the courtyard's boundaries, the entire courtyard must be covered using whole tiles. The garden club wants to minimize waste and cost.
What is the minimum number of ceramic tiles needed to complete this artistic endeavor and fully cover the courtyard?
Constraints
Input Format
The input contains three positive integer numbers in the first line: n, m and a
Output Format
Write the needed number of flagstones.
Example 1
Input:
6 6 4
Output:
4
Explanation:
Example is Self Explanatory
Log In to solve the Question