n = int(eval(input()))

count = 0



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

    if len(str(i)) % 2 == 1:

        count += 1

print(count)



n = eval(input())

num = int(n)

ans = 0



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

    if len(str(i)) % 2 == 1:

        ans += 1

#        print(i)



print(ans)

n = int(eval(input()))
count = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        count += 1
print(count)

n = eval(input())
num = int(n)
ans = 0
for i in range(1, num + 1):
    if len(str(i)) % 2 == 1:
        ans += 1
#        print(i)
print(ans)

-n = int(eval(input())) -count = 0 -for i in range(1, n + 1): +n = eval(input()) +num = int(n) +ans = 0 +for i in range(1, num + 1): -        count += 1 -print(count) +        ans += 1 +#        print(i) +print(ans)