URI Online Judge | 3106

Coding Competition

By Giovanna Kobus Conrado, University of São Paulo BR Brazil

Timelimit: 1

A group of students decided to organize the GCC (Greatest Coding Competition), which will be, obviously, the greatest coding competition that has ever happened. There are N universities that can send students to participate in the form of teams of three. Now the organizers of the GCC want to know: assuming that each student attends only one university and can be in only one team and that teams can only be formed by students from the same university, what is the maximum number of students could attend the GCC.

Input

The first line of input contains N (0≤N≤105), the number of universities that can send students to attend the GCC.

The second line of input contains N integers: the i-th integer Si is the amount of students in the i-th university (0≤Si≤102).

Output

The output must constain a single integer: the maximum number of students could attend the GCC given the constraints above.

Input Sample Output Sample

5
49 15 78 78 59

276