117. Books
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
This problem is worth 5 points.

You have a list of $$$n$$$ books. You want to read one complete book, but you want to read as few pages as possible. You're given the list of how many pages each book has. Figure out the minimum number of pages that you have to read, reading at least one complete book.

Input

The first line of input contains a positive integer $$$n$$$: the number of books. The next line contains $$$n$$$ space-separated integers: the number of pages of each book.

Output

Output a single positive integer $$$p$$$: the minimum number of pages that you have to read, if you read at least one complete book.

Examples
Input
5
179 173 275 865 180
Output
173
Input
5
500 450 300 299 100
Output
100