Problem Description
By the laws of Bearlands, freedom of speech is limited, and no citizen is allowed to send any email to anyone else in Bearlands. However, due to loose control of the internet, Desmond, the dictator of Bearlands, has somehow found out that there has been a massive flood of emails going around Bearlands and he intends to stop it!
Bearlands is made up of a city is made up of N houses. The new law of Bearlands now states that for every email a household sends out, one person in the household must be executed. In other words, if a household sends out E emails, there will be E executions from that house. You will be given the number of emails sent by each household. Calculate the number of executions that will be held in Bearlands due to this offense.
Input
The first line of input will contain one integer, N.
The second line of input will contain N integers, where the ith integer will indicate the number of emails sent by the ith house.
Output
Your output should contain one line with one integer, the total number of executions to be held.
Your output should end with a newline.
Limits
1 <= N <= 100 000
Sample Input 1
5
1 2 3 4 5
Sample Output 1
15
Sample Input 2
7
2 3 1 4 5 10 9
Sample Output 2
34