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
and it holds that
Unfortunately, when the teacher downloaded the task to her computer, the text formatting was
lost so the task transformed into a sum of
For example, without text formatting, the original task in the form of
Please note: We know that it holds
Input Specification
The first line of input contains the integer
Output Specification
The first and only line of output must contain the value of
Sample Input 1
2
212
1253
Sample Output 1
1953566
Explanation for Sample Output 1
Sample Input 2
5
23
17
43
52
22
Sample Output 2
102
Sample Input 3
3
213
102
45
Sample Output 3
10385
Comments