Skip to main content

~/algor $ cat contests/round-6/B

B. Tiling the square

Problem B ICPC rules 1000 ms 64 MB

A city square is a rectangle of size . It must be covered with square tiles of size . Tiles cannot be broken, and their sides are parallel to the sides of the square. Tiles may stick out over the edge of the square, but the square must be covered completely. What is the smallest number of tiles needed?

An n × m square and the a × a tiles covering it, sticking out over its edge

Input

One line contains three positive integers: , and .

Output

One integer — the number of tiles.

Note

Examples

Input #1
6 6 4
Output #1
4
Input #2
3 7 2
Output #2
8

Sign in to submit a solution

Signing up is free and takes a minute.