402172: GYM100685 I Innovative Business

Memory Limit:256 MB Time Limit:0 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

I. Innovative Businesstime limit per test0.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

Chip 'n' Dale have started a new business in the forest: they produce tiles of fixed rectangular size and pave roads with them.

Road paving rules are the following. Starting from one corner of the rectangular road tiles are paved side-by-side without gaps or overlaps. Tiles can be cut into pieces to be used to pave the road if and only if the whole tile doesn't fit. Each tile contains a pattern with parallel lines that must be retained on the paved road. This makes their orientation significant: any tile or its piece can not be rotated. All tile connection lines are straight, parallel to one of the road edges and either perpendicular or parallel to each other. Chip 'n' Dale always pave the road so that each edge of a tile is adjacent to not more than one other tile, and they always pave the road with the least possible amount of tile pieces on the road.

Given the size of the road and the size of one tile please help Chip 'n' Dale determine the number of tiles they need to produce to fully pave the road.

Input

On the first line of input integers Widthroad and Lengthroad (1 ≤ Widthroad, Lengthroad ≤ 10 000) are given — the width and the length of the road respectively.

On the second line of input integers Widthtile and Lengthtile (1 ≤ Widthtile ≤ Widthroad, 1 ≤ Lengthtile ≤ Lengthroad) are given — the width and the length of the tile respectively.

Output

The first line of the output should contain a single integer number N — the minimal number of whole tiles needed to fully pave the road according to Chip 'n' Dale road paving rules.

ExamplesInput
10 10
2 2
Output
25
Input
3 5
2 2
Output
4
Input
35 17
25 1
Output
26

加入题单

上一题 下一题 算法标签: