#D9251. Working
Working
Working
G: Working
Kou decided to do the same number of jobs every day for the next .
jobs are added on the day of the day.
Mr. Kou has no work to do now, and he doesn't have to finish all the work by the day.
How many jobs can you do in a day?
However, Mr. Kou is excellent, so he can do as many jobs as he has.
input
is given on the first line.
On the second line, integers are given, separated by blanks.
output
Output the maximum number of jobs you can do in a day. Insert a line break at the end.
Constraint
- is an integer greater than or equal to and less than or equal to
- are integers between and
Input example 1
Five 4 2 5 3 1
Output example 1
3
If you decide to work more than a day, you'll run out of work on the second day.
Input example 2
Five 9 9 1 9 9
Output example 2
6
Example
Input
5 4 2 5 3 1
Output
3
inputFormat
input
is given on the first line.
On the second line, integers are given, separated by blanks.
outputFormat
output
Output the maximum number of jobs you can do in a day. Insert a line break at the end.
Constraint
- is an integer greater than or equal to and less than or equal to
- are integers between and
Input example 1
Five 4 2 5 3 1
Output example 1
3
If you decide to work more than a day, you'll run out of work on the second day.
Input example 2
Five 9 9 1 9 9
Output example 2
6
Example
Input
5 4 2 5 3 1
Output
3
样例
5
4 2 5 3 1
3