#C1754. Toll Stations Count

    ID: 44994 Type: Default 1000ms 256MiB

Toll Stations Count

Toll Stations Count

In a city represented by a rectangular grid, toll stations are installed at intersections such that they occur at every N blocks both horizontally and vertically. The city grid has a width of (W) blocks and a height of (H) blocks. Toll stations are placed along the boundaries and at uniform intervals; thus, the total number of toll stations is calculated by counting the number of intersections where the toll stations are installed.

The formula used is: [ T = \left(\lfloor \frac{W}{N} \rfloor + 1\right) \times \left(\lfloor \frac{H}{N} \rfloor + 1\right), ] where (\lfloor x \rfloor) denotes the floor function.

Your task is to compute the number of toll stations installed given the values of (W), (H), and (N). Make sure to read the input from standard input (stdin) and output the result to standard output (stdout).

inputFormat

The input consists of a single line containing three space-separated positive integers: (W) (the width of the city in blocks), (H) (the height of the city in blocks), and (N) (the interval at which toll stations are installed).

outputFormat

Output a single integer which is the total number of toll stations installed based on the given city dimensions and toll interval.## sample

3 3 2
4