Cafe "Proboscis"#4746

Cafe "Proboscis"

1 second
64 megabytes
Very easy

The new cafe "Proboscis" is opened in the city of for elephants. All clients come to the cafe at the time , 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 ).

The owner knows that if the elephant will be served at the time , he will pay tips_i - t tips. If the number tips_i - t is negative, he will pay nothing. Help the owner to find the service order of elephants that will bring him the maximum profit.

Input

The first line contains the number of elephants (0 \le n \le 100), arrived to cafe. The next line contains numbers tips_1, tips_2, , tips_n (0 \le tips_i \le 10^5).

Output

Print the maximum profit of the cafe owner.

Examples

Example 1

Loading
Loading