Skip to main content
LIVE CONTEST: Round #7 · Begin Marathon is live now! …
Problems
#850

~/algor $ cat problems/USYMKoYPg4Rm

Tiling the square

Easy 1000 ms 64 MB 10%
Share

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.