N = int(eval(input()))

odd_num = 0

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

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

        odd_num += 1

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

count = 0

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

    if 1<=i <=9 or 100<=i <= 999 or 10000<= i <= 99999:

        count += 1

    else:

    

        count +=0

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

N = int(eval(input()))
count = 0
for i in range(1, N + 1):
    if 1 <= i <= 9 or 100 <= i <= 999 or 10000 <= i <= 99999:
        count += 1
    else:
        count += 0
print(count)

-odd_num = 0 +count = 0 -    if len(str(i)) % 2 == 1: -        odd_num += 1 -print(odd_num) +    if 1 <= i <= 9 or 100 <= i <= 999 or 10000 <= i <= 99999: +        count += 1 +    else: +        count += 0 +print(count)