The new cafe "Proboscis" is opened in the city of Е. for elephants. All clients come to the cafe at the time 0, and the owner chooses the order in which to serve them. Every second only one elephant is served (the first one is served at the time 0).
The owner knows that if the elefant i will be served at the time t, he will pay
tipsi - t tips. If the number
tipsi - t is negative, he will pay nothing. Help the owner to find the service order of elephants that will bring him the maximum profit.
The first line contains the number of elephants n (0 ≤ n ≤ 100), arrived to cafe. The next line contains n numbers
tipsn (0 ≤
Print the maximum profit for cafe owners.
3 3 2 3