N = int(eval(input()))

count = 0



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

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

        count += 1



print(count)
N = int(eval(input()))

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

N = int(eval(input()))
print((len(list(i for i in range(1, N + 1) if len(str(i)) % 2 == 1))))

-count = 0 -for i in range(1, N + 1): -    if len(str(i)) % 2 == 1: -        count += 1 -print(count) +print((len(list(i for i in range(1, N + 1) if len(str(i)) % 2 == 1))))