Олимпиадный тренинг

Задача 34815. Multiple highs (lows) - 1


Задача

Темы: Цикл for
The sum of points scored by each of the N teams participating in the football championship is known. Determine the sum of points scored by the teams that took the first three places in the championship (teams could score the same number of points).

Input data: in the first line enter the number N - the number of teams (4 < N<= 100), and then N integers - the number of points scored.
Output: print the answer to the problem

Examples
# Input Output
1 7
3
3
6
3
4
3
4
14
 
 
Запрещенные операторы:list;[;sort