#abc196c. [abc196_c]Doubled

[abc196_c]Doubled

Problem Statement

Given is an integer NN.
How many integers xx between 11 and NN (inclusive) satisfy the following condition?

  • The decimal representation (without leading zeros) of xx has an even number of digits, and its first and second halves are equal as strings.

Constraints

  • NN is an integer.
  • 1N<10121 ≤ N < 10^{12}

Input

Input is given from Standard Input in the following format:

NN

Output

Print the answer.


Sample Input 1

33

Sample Output 1

3

Three numbers 1111, 2222, and 3333 satisfy the condition.


Sample Input 2

1333

Sample Output 2

13

For example, the decimal representation of 13131313 has four digits, and its first and second halves are both 1313, so 13131313 satisfies the condition.


Sample Input 3

10000000

Sample Output 3

999