Competitions

# Greedy

# Cafe "Proboscis"

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 `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 **n** (**0** ≤ **n** ≤ **100**), arrived to cafe. The next line contains **n** numbers `tips`

, _{1}`tips`

, ..., _{2}`tips`

(_{n}**0** ≤ `tips`

≤ _{i}`10`

).^{5}

#### Output

Print the maximum profit for cafe owners.

Input example #1

3 3 2 3

Output example #1

5