PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000005. Lát gạch quảng trường (Theatre Square)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Lát gạch quảng trường (Theatre Square)

Theatre Square

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

A rectangular square measures n×mn\times m meters. Cover it with the minimum number of square flagstones of side aa, aligned with the sides. Stones cannot be broken, may extend beyond the square, and must not overlap.

Input

One line containing n,m,an,m,a.

Output

Print the minimum number of flagstones.

Subtasks

  • Subtask 1 (20 points): 1≤n,m,a≤1001 \le n,m,a \le 100
  • Subtask 2 (30 points): 1≤n,m,a≤1051 \le n,m,a \le 10^{5}
  • Subtask 3 (50 points): 1≤n,m,a≤1091 \le n,m,a \le 10^{9}

Examples

Input

6 6 4

Output

4

Explanation

Each dimension needs two stones of side 44, so the answer is 2×2=42\times2=4.