A - Shikishi Squares Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MiB

配点 : 200 点

問題文

高橋君は縦 A cm、横 B cm の長方形の色紙を持っています。

高橋君はこの色紙から、 1 辺が C cm の正方形をできるだけ多く切り出したいです。ただし、正方形の辺は色紙の辺と平行になるように切り、切り出した正方形どうしが重なってはいけません。

切り出せる正方形の最大の枚数を求めてください。

制約

  • 1 \leq A \leq 1000
  • 1 \leq B \leq 1000
  • 1 \leq C \leq 1000
  • 入力はすべて整数

入力

入力は以下の形式で標準入力から与えられる。

A B C
  • 1 行目には、色紙の縦の長さ A 、横の長さ B 、正方形の 1 辺の長さ C がスペース区切りで与えられる。

出力

切り出せる正方形の最大の枚数を 1 行で出力せよ。


入力例 1

4 6 2

出力例 1

6

入力例 2

1 1 2

出力例 2

0

入力例 3

9 3 3

出力例 3

3

入力例 4

540 973 452

出力例 4

2

入力例 5

999 1000 1

出力例 5

999000

Score : 200 pts

Problem Statement

Takahashi has a rectangular sheet of colored paper (shikishi) that is A cm tall and B cm wide.

He wants to cut out as many squares with side length C cm as possible from this sheet. The squares must be cut so that their sides are parallel to the sides of the sheet, and the cut-out squares must not overlap each other.

Find the maximum number of squares that can be cut out.

Constraints

  • 1 \leq A \leq 1000
  • 1 \leq B \leq 1000
  • 1 \leq C \leq 1000
  • All input values are integers.

Input

The input is given from standard input in the following format:

A B C
  • The first line contains the height of the sheet A, the width of the sheet B, and the side length of the square C, separated by spaces.

Output

Print the maximum number of squares that can be cut out in one line.


Sample Input 1

4 6 2

Sample Output 1

6

Sample Input 2

1 1 2

Sample Output 2

0

Sample Input 3

9 3 3

Sample Output 3

3

Sample Input 4

540 973 452

Sample Output 4

2

Sample Input 5

999 1000 1

Sample Output 5

999000