Nordic Combined#742

Nordic Combined

1 second
64 megabytes
Easy

Nordic combined (northern combination) is a sport in which athletes first perform ski jumps from a springboard and then run a cross-country ski race. In the ski race, athletes start with a delay based on their points deficit from the ski jump; this deficit, multiplied by , determines the starting delay in the second event. The winner of the entire competition is the athlete who finishes the ski race first.

However, in Vancouver, not everyone liked the delay calculation formula. As a result, some considered the competition too predictable. Therefore, before the next Winter Olympics in Innsbruck, a new delay calculation scheme was tested. Formally, the scheme works as follows: let be the points deficit. Perform a cyclic shift on the number exactly times, where is the number of digits in 's representation. A cyclic shift consists of moving the last digit to the front of the number. Leading zeros are preserved, so the number always has digits. The final delay is the sum of all numbers obtained from these cyclic shifts.

Write a program that calculates the delay.

Input

The input consists of a single line containing an integer (1 \leq N \leq 10^{100\,000}).

Output

Output a single number: the answer.

Examples

Example 1

Loading
Loading