100 atcoder#ABC195C. [ABC195C] Comma

[ABC195C] Comma

Score : 300300 points

Problem Statement

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

How many commas will be used in total when he writes each integer from 11 through NN once?

Constraints

  • 1N10151 \leq N \leq 10^{15}
  • NN is an integer.

Input

Input is given from Standard Input in the following format:

NN

Output

Print the total number of commas.

1010
11

No comma is used in writing 999999 or smaller numbers. One comma is used in writing each of the numbers from 10001000 through 10101010.

Thus, 1111 commas are used in total.

27182818284590
107730272137364