from math import log10

n = int(eval(input()))

cnt = 0

for i in range(1,n+1):

  if int(log10(i)+1) % 2 != 0 and i <= n:

    cnt += 1

print(cnt)
from math import log10

n =int(eval(input()))

print((len([i for i in range(1, n+1) if int(log10(i)+1) % 2 != 0 and i <= n])))
from math import log10

n = int(eval(input()))
cnt = 0
for i in range(1, n + 1):
    if int(log10(i) + 1) % 2 != 0 and i <= n:
        cnt += 1
print(cnt)

from math import log10

n = int(eval(input()))
print((len([i for i in range(1, n + 1) if int(log10(i) + 1) % 2 != 0 and i <= n])))

-cnt = 0 -for i in range(1, n + 1): -    if int(log10(i) + 1) % 2 != 0 and i <= n: -        cnt += 1 -print(cnt) +print((len([i for i in range(1, n + 1) if int(log10(i) + 1) % 2 != 0 and i <= n])))