AtCoder Beginner Contest 136
B
Uneven Numbers
AtCoder
⌀ 0
原题
← AC →
翻译中…

Problem Statement

翻译中…

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).

翻译中…

Constraints

翻译中…
  • $1 \leq N \leq 10^5$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N

翻译中…

Output

翻译中…

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

翻译中…

样例

Input #1
11
Output #1
9
Among the positive integers less than or equal to $11$, nine integers have an odd number of digits: $1, 2, \ldots, 9$.
Input #2
136
Output #2
46
In addition to $1, 2, \ldots, 9$, another $37$ integers also have an odd number of digits: $100, 101, \ldots, 136$.
Input #3
100000
Output #3
90909
题目信息
题号
abc136_b
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。