N = int(eval(input()))



ans = 0



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

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

        ans += 1

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



if N < 10:

    print(N)

elif 10 <= N < 100:

    print((9))

elif 100 <= N < 1000:

    print((N-90))

elif 1000 <= N < 10000:

    print((909))

elif 10000 <= N <100000:

    print((N-9090))

else:

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

N = int(eval(input()))
if N < 10:
    print(N)
elif 10 <= N < 100:
    print((9))
elif 100 <= N < 1000:
    print((N - 90))
elif 1000 <= N < 10000:
    print((909))
elif 10000 <= N < 100000:
    print((N - 9090))
else:
    print((90909))

-ans = 0 -for i in range(1, N + 1): -    if len(str(i)) % 2 == 1: -        ans += 1 -print(ans) +if N < 10: +    print(N) +elif 10 <= N < 100: +    print((9)) +elif 100 <= N < 1000: +    print((N - 90)) +elif 1000 <= N < 10000: +    print((909)) +elif 10000 <= N < 100000: +    print((N - 9090)) +else: +    print((90909))