has been kidnapped! Unfortunately, he is locked inside a room which requires a secret password to open the doors. He knows that if he gathers all the numbers in the room, he will have to input the three largest numbers.
Given integers, can you output the sum of the numbers required to exit the room?
Input Specifications
The first line will be , the amount of numbers in the room.
The next and last line will contain spaced integers .
Output Specifications
The only line of output should be the sum of the numbers required to escape the room.
Sample Input 1
4
2 3 5 3
Sample Output 1
11
Comments