Problem F. New function

Author:Anton Karabanov   Time limit:1 sec
Input file:Standard input   Memory limit:512 Mb
Output file:Standard output  

Statement

Timofey came up with a new function and named it after himself. Now his name proudly stands besides the name of Euler, Möbius and Riemann — some functions were also named after them. Unfortunately, Timofey hasn't found a practical use case for his discovery yet, but he is actively working on it.

Timofey's function is defined on positive integers as follows: f(x) = x + ⌊ x10⌋  + ⌊ x100⌋  + ⌊ x1000⌋  + …, where ⌊ x10n is rounding down to an integer. For example, f(404) = 404 + ⌊ 40410⌋  + ⌊ 404100⌋  = 404 + 40 + 4 = 448.

While Timofey is writing a paper for a mathematical journal, find number x such that f(x) = n.

Input format

Input contains a positive integer n — function value.

Output format

Output a single positive integer — an argument the function has the desired value at. It's guaranteed to be unique.

Constraints

1 ≤ n ≤ 1018

Sample tests

No. Standard input Standard output
1
448
404

0.071s 0.014s 13