Problem10738--ABC136 - B - Uneven Numbers

10738: ABC136 - B - Uneven Numbers

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

Description

Given is an integer $N$. Find the number of positive integers less than or equal to $N$ that have an odd number of digits (in base ten without leading zeros).

Input

Print the number of positive integers less than or equal to $N$ that have an odd number of digits.

Output

Print the number of positive integers less than or equal to $N$ that have an odd number of digits.

Constraints

-   $1 \leq N \leq 10^5$

Sample 1 Input

11

Sample 1 Output

9

Among the positive integers less than or equal to $11$, nine integers have an odd number of digits: $1, 2, \ldots, 9$.

Sample 2 Input

136

Sample 2 Output

46

In addition to $1, 2, \ldots, 9$, another $37$ integers also have an odd number of digits: $100, 101, \ldots, 136$.

Sample 3 Input

100000

Sample 3 Output

90909

Source/Category