#C3835. Encrypted Amount Calculation

    ID: 47306 Type: Default 1000ms 256MiB

Encrypted Amount Calculation

Encrypted Amount Calculation

You are given a non-negative integer amount. The task is to encrypt this amount by processing its digits from right to left and multiplying each digit by an increasing multiplier.

The rule is as follows: Let the digits of amount (when written in base 10) be \(d_1, d_2, \ldots, d_n\) from left to right. Then the encryption is computed as:

\(\text{encrypted_amount} = d_n \times 2 + d_{n-1} \times 3 + \cdots + d_1 \times (n+1)\)

For example, if amount = 123, the encrypted amount is calculated as:

\(3 \times 2 + 2 \times 3 + 1 \times 4 = 6 + 6 + 4 = 16\)

Your solution should read the input from standard input (stdin) and output the result to standard output (stdout).

inputFormat

The input is provided via standard input. It consists of a single line containing a non-negative integer amount (where \(0 \leq amount \leq 10^9\)).

outputFormat

The output is a single integer printed to standard output, which is the encrypted amount computed as described.

## sample
5
10