题目描述
Problem Statement
Given is an integer N.
How many integers x between 1 and N (inclusive) satisfy the following condition?
- The decimal representation (without leading zeros) of x has an even number of digits, and its first and second halves are equal as strings.
Input
Input is given from Standard Input in the following format:
N
Output
Print the answer.
Constraints
- N is an integer.
- 1 ≤ N < 10^{12}
Sample Input 1
33
Sample Output 1
3
Three numbers 11, 22, and 33 satisfy the condition.
Sample Input 2
1333
Sample Output 2
13
For example, the decimal representation of 1313 has four digits, and its first and second halves are both 13, so 1313 satisfies the condition.
Sample Input 3
10000000
Sample Output 3
999
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
33
样例输出
3