n=int(eval(input()))

cnt=0

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

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

    cnt+=1

print(cnt)    
n=int(eval(input()))

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

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

-cnt = 0 -for i in range(1, n + 1): -    if len(str(i)) % 2 == 1: -        cnt += 1 -print(cnt) +print((len([i for i in range(1, n + 1) if len(str(i)) % 2 == 1])))