#MC1002. 砍树

砍树

Question Background

Steve needs enough wood to build his house, so he comes to a forest.

Since Steve's arms aren't long enough, he can only reach the wood up to the seventh block high.

Steve already knows the height of each tree in the forest. Please write a program to help him calculate how much wood he can obtain.

Input Format

The first line of the input contains only a positive integer n, representing the number of trees. The next line contains n positive integers separated by spaces, a1, a2, ..., an, describing the height of each tree in sequence. It is guaranteed that n < 10 and ai < 20.

Output Format

The output should consist of only one positive integer on a single line, representing the amount of wood that can be obtained.

Sample Input

5
9 7 4 8 5

Sample Output

30