System of equations#7289

System of equations

0.1 seconds
64 megabytes
Very easy

After spending time with Marysia at the zoo, Stepan finally sat down to tackle his algebra homework. However, his thoughts are still on Marysia, making it difficult for him to solve the following problem:

Let represent the sum of the digits of the number , where is a non-negative integer. Determine the number of solutions to the following system:

X + Y = A
S(X) + S(Y) = S(A)

All numbers involved are non-negative integers.

Help him find the solution.

Input

The input consists of a single number (0 \leq A \leq 10^{100}), provided without leading zeros.

Output

Output a single number, which is the count of solutions to this system.

Examples

Example 1

Loading
Loading

Note

Explanation for the example:

In the given example, there are solutions: (x = 0, y = 11), (x = 11, y = 0), (x = 1, y = 10), (x = 10, y = 1).