## COCI '15 Contest 3 #1 Pot

View as PDF

Points: 5
Time limit: 1.0s
Memory limit: 64M

Problem types

The teacher has sent an e-mail to her students with the following task: "Write a program that will determine and output the value of if given the statement:

and it holds that to are integers, and to one-digit integers."

Unfortunately, when the teacher downloaded the task to her computer, the text formatting was lost so the task transformed into a sum of integers:

For example, without text formatting, the original task in the form of became a task in the form of . Help the teacher by writing a program that will, for given integers from to determine and output the value of from the original task.

Please note: We know that it holds ( times).

#### Input Specification

The first line of input contains the integer , the number of the addends from the task. Each of the following lines contains the integer from the task.

#### Output Specification

The first and only line of output must contain the value of from the original task.

#### Sample Input 1

2
212
1253

#### Sample Output 1

1953566

.

#### Sample Input 2

5
23
17
43
52
22

#### Sample Output 2

102

#### Sample Input 3

3
213
102
45

#### Sample Output 3

10385