Problem9734--ABC195 —— C - Comma

9734: ABC195 —— C - Comma

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

When Takahashi writes an integer, he uses a comma every third digit from the right. For example, $1234567$ is written as `1,234,567`, and $777$ is written as `777`.

How many commas will be used in total when he writes each integer from $1$ through $N$ once?

Input

Input is given from Standard Input in the following format:

```
$N$
```

Output

Print the total number of commas.

Constraints

-   $1 \leq N \leq 10^{15}$
-   $N$ is an integer.

Sample 1 Input

1010

Sample 1 Output

11
No comma is used in writing 999 or smaller numbers. One comma is used in writing each of the numbers from 1000 through 1010.
Thus, 11 commas are used in total.

Sample 2 Input

27182818284590

Sample 2 Output

107730272137364

Source/Category