eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Innovative Business

Innovative Business

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 '\textbf{n}' Dale determine the number of tiles they need to produce to fully pave the road. \InputFile On the first line of input integers \textbf{Width_road} and \textbf{Length_road} (\textbf{1} ≤ \textbf{Width_road}, \textbf{Length_road} ≤ \textbf{10000}) are given --- the width and the length of the road respectively. On the second line of input integers \textbf{Width_tile} and \textbf{Length_tile} (\textbf{1} ≤ \textbf{Width_tile} ≤ \textbf{Width_road}, \textbf{1} ≤ \textbf{Length_tile} ≤ \textbf{Length_road}) are given --- the width and the length of the tile respectively. \OutputFile The first line of the output should contain a single integer number \textbf{N} --- the minimal number of whole tiles needed to fully pave the road according to Chip '\textbf{n}' Dale road paving rules.
Ліміт часу 1 секунда
Ліміт використання пам'яті 256 MiB
Вхідні дані #1
10 10
2 2
Вихідні дані #1
25
Джерело ACM ICPC 2012-2013, NEERC, Moscow Subregion, Moscow, Sunday, October 21, 2012