Last month, millions of people around the world took the streets in what could be largest environmental protest in history. Many posters had: “There is no PLANet B!” written on them.

Fito and his friend were part of the protests because they also believe that our beautiful planet is under a huge threat. The weather is more extreme and the oceans have a lot of plastic. Moreover, industrial production, farming methods and mass deforestation have led to the extinction of many species. They know that if we continue like this, it’s almost certain that sea levels will continue to rise, there will be extreme heat-waves, loss of the polar ice caps and mass pollution; in short, a very worrying future for us all. Therefore, we need to do something before it’s too late.

Fito and his friend decided to take action and will plant as many trees as they can. They have a sequence of positions $\lbrace A_i \rbrace$ of length $N$ where it would be nice to have a tree (there could be some repeated positions). Each position is represented by an integer that indicates the distance to the start of the street (they will plant all the trees in the same street). Your task is to help Fito and his friend to find out what is the maximum distance between any two trees they will plant.

The first line of input contains the integer $N$ ($2 \leq N \leq 100$). The second line contains $N$ integers $A_i$ ($1 \leq A_i \leq 10^9$) separated by a space that represent the positions of the trees.

Print the maximum absolute difference between two positions.

Input

4
1 4 6 3

Output

5

Input

2
1000000000 1

Output

999999999

Input

5
1 1 1 1 1

Output

0

In the first case, the maximum absolute difference of two positions is $A_3−A_1=6−1=5$.