| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 2048 MB | 153 | 93 | 71 | 60.169% |
Alice likes building toy walls. She has a lot of 1ドル \times 2$ bricks and a limited supply of 1ドル \times 3$ bricks. Both types of bricks have a height of 1 and can not be rotated.
Alice is going to build a one unit thick wall of length $l$ and height $h$ out of these bricks. A wall is solid if there are no seams directly above another seam.
Help Alice determine the minimum number of 1ドル \times 3$ bricks required to build a solid wall of length $l$ and height $h$.
The only line contains two integers $l$ and $h,ドル denoting the length and the height of the wall (5ドル \le l \le 1000$; 2ドル \le h \le 1000$).
Print the minimum number of 1ドル \times 3$ bricks required to build a solid $l \times h$ wall.
It can be shown that it is always possible to build a solid wall of length $l$ and height $h$.
7 4
4