An array $ A $ consists of $ N $ integers $ A_1, A_2, \ldots , A_N $. ($ A_i $ is the $ i $th element.) Find the minimum and maximum values in $ A $, and the sum of $ A $.

Input

The first line of input contains the integer $ N $.
The second line of input contains $ N $ integers where the $ i $th integer is $ A_i $ (which are the elements of $ A $).

Output

Output the minimum value of $ A $ on the first line.
Output the maximum value of $ A $ on the second line.
Finally, output the sum of $ A $ on the third line.

Constraints

$ 1 \le N \le 1000 $
$ -10^6 \le A_i \le 10^6 $

Sample Test Cases

Input Output
5
0 2 4 9 6
0
9
21
Click to copy.

Scoring: Per Case
Authored by s16f22