When Sang-geun was in elementary school, he liked to finish his vacation homework ahead of everyone else and spend the rest of the break playing. The homework consists of solving math problems and Korean-language problems.
The vacation lasts $L$ days in total. He must solve $A$ pages of Korean and $B$ pages of math. Each day Sang-geun can solve at most $C$ pages of Korean and at most $D$ pages of math, and he may work on both subjects on the same day.
Write a program that finds the maximum number of days Sang-geun can spend playing after finishing all of his homework during the vacation.
Five lines are given, one value per line: $L$, $A$, $B$, $C$, $D$. ($2 \le L \le 40$, $1 \le A, B \le 1000$, $1 \le C, D \le 100$)
The input is always such that the homework can be finished within the vacation period.
Print the maximum number of days Sang-geun can spend playing.