Petriukas has an infinite number of wooden rods, each of length
𝑛.
He wants to make two identical door frames, where the two vertical beams (left and right) are of length
𝑎
each, and one horizontal beam (top beam) is of length
𝑏.
Each beam requires a continuous piece of wood.
Determine the minimum number of wooden rods required to make the two door frames.
Petriukas can cut the rods into any pieces, but each door beam must be a single continuous piece of a rod.
Input
The input consists of three integers,
𝑛,
𝑎, and
𝑏, each given on a separate line. (1 \le n \le 1000, 1 \le a,b\le n).
Output
Output the minimum number of rods required.
Examples
standard input | standard output |
---|
8
1
2
| 1
|
5
3
4
| 6
|
6
4
2
| 4
|