print((sum(len(str(i+1))%2 for i in range(int(eval(input()))))))
n=eval(input());k=len(n)

print((sum(9*10**~-i for i in range(k) if i%2)-(10**~-k-int(n)-1)*(k%2)))
print((sum(len(str(i + 1)) % 2 for i in range(int(eval(input()))))))

n = eval(input())
k = len(n)
print(
    (sum(9 * 10 ** ~-i for i in range(k) if i % 2) - (10 ** ~-k - int(n) - 1) * (k % 2))
)

-print((sum(len(str(i + 1)) % 2 for i in range(int(eval(input())))))) +n = eval(input()) +k = len(n) +print( +    (sum(9 * 10 ** ~-i for i in range(k) if i % 2) - (10 ** ~-k - int(n) - 1) * (k % 2)) +)