You have
N bags of candy. There are some candies in each bag of
. Determine the maximum difference between the number of candies of any two bags.
Input
The first line contains an integer N (1<=N<=100). The second line contains N numbers ai (1<=ai<=109 ) - number of candies in i-th bag.
Imprint
Print the maximum difference between the number of candies of any two bags.
Examples
| # |
Input |
Output |
| 1 |
4
1 4 6 3
| 5 |
| 2 |
5
1 1 1 1 1
| 0 |