407032: GYM102697 003 Triangle Sum
Description
Triangles are one of the simplest geometric shapes. Equilateral triangles have the special property of all three of their sides being equal to each other. In this problem, you will be given a list of side lengths of equilateral triangles. You should find the sum of the perimeters of the triangles, given that the triangles are all equilateral.
InputThe first line of the input will contain a positive integer n indicating the number of triangles. Each of the next n lines will contain an integer t, indicating the side length of each triangle.
OutputPrint one number, the calculated sum of the perimeters of the triangles.
ExampleInput3 3 4 6Output
39Note
In the example, the first triangle has a side length of 3, so it has a perimeter of 9. The second triangle has a perimeter of 12, and the third triangle has a perimeter of 18.