The array of integers is given. Find the sum of the smallest and the largest elements of the array.
The first line contains the number of elements (n \le 100) in the array. The second line contains integers, each of which does not exceed in absolute value.
Print the sum of the smallest and the largest elements of the array.
Example 1