Problem:
 Score : 200 points    Problem Statement Given is an integer N . Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).      Constraints  1 \leq N \leq 10^5         Input Input is given from Standard Input in the following format:  N       Output Print the number of positive integers less than or equal to N that have an odd number of digits.        Sample Input 1 11      Sample Output 1 9  Among the positive integers less than or equal to 11 , nine integers have an odd number of digits: 1, 2, \ldots, 9 .       Sample Input 2 136      Sample Output 2 46  In addition to 1, 2, \ldots, 9 , another 37 integers also have an odd number of digits: 100, 101, \ldots, 136 .       Sample Input 3 100000      Sample Output 3 90909

Solution (Python):
n = int(input())
ans = 0
for i in range(0, 3):
    for j in range(1*(100**i), 10*(100**i)):
        if j<=n:
            ans += 1
        else:
            print(ans)
            exit()
print(ans)

Solution (Python):
n=int(input())
ans=0
for i in range(1,n+1):
    if len(str(i))%2==1:
        ans+=1
print(ans)

Solution (Python):
n = int(input())
cnt = 0

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

Solution (Python):
N = int(input())

keta = len(str(N))

if keta % 2 == 0:
     ans = 0
else:
     ans = N - 10 ** (keta-1) + 1

i = 1
while i < keta:
     ans += 10**i - 10**(i-1)
     i += 2


print(ans)

Solution (Python):
def resolve():
    n=int(input())
    c=0
    for i in range(1,n+1):
        if len(str(i))%2==1:c+=1
    print(c)
resolve()

Solution (Python):
n = int(input())

if n <= 99:
    print(min(n, 9))
elif 100 <= n <= 9999:
    print(9 + ((min(n, 999)) - 99))
else:
    print(9 + 900 + min(n, 99999) - 9999)

Solution (Python):
n = int(input())

keta = len(str(n))
cnt = 0

for i in range(keta):
    if i%2 != 0: 
        cnt += 10**i - 10**(i-1)
    if i == keta-1 and keta%2 != 0:
        cnt += n - 10**(keta-1) + 1

print(cnt)

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

Solution (Python):
def main():

    number = int(input())
    count = 0

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

        length = len(str(i))
        if length%2 != 0:
            count += 1


    print(count)


if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())

ans=0
for i in range(1,N+1):
  s=str(i)
  if len(s)%2 !=0:
    ans+=1
    
print(ans)

Solution (Python):
def solve():
    N = int(input())
    count = 0
    for i in range(N):
        if(int(len(str(i+1))) % 2 == 1):
            count += 1
    print(count)


if __name__ == "__main__":
    solve()

Solution (Python):
n = int(input())
c = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 != 0:
        c += 1
print(c)

Solution (Python):
N = int(input())
num = N
count = 0
result = 0

while num >= 1:
    num = num / 10
    count += 1

if count % 2 == 0:
    count -= 1
    while count > 0:
        result += 10**(count)-10**(count-1)
        count -= 2
else:
    result = result + N - 10**(count-1) + 1
    count -= 2
    while count > 0:
        result += 10**(count)-10**(count-1)
        count -= 2

print(result)

Solution (Python):
N=input()

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

Solution (Python):
N = int(input())
cnt = 0
for i in range(1, N+1):
    if len(str(i)) % 2 == 1:
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())
res = 0
for i in range(1,n+1):
  if len(str(i))%2 == 1:
    res += 1
print(res)

Solution (Python):
N = int(input())
res = 0
for i in range(1,N+1):
    if len(str(i))%2 == 1:
        res += 1
print(res)

Solution (Python):
import math
N = int(input())
digit = int(math.log10(N)) + 1
ans = 0
for i in range(1, digit, 2):
  ans += 9 * (10 ** (i-1))
 
if digit % 2 == 1:
  ans += N - (10 ** (digit - 1) - 1)
 
print(ans)

Solution (Python):
N = int(input())
res = 0
for n in range(1,N+1):
    if len(str(n))%2==1:
        res +=1
print(res)

Solution (Python):
N=int(input())
ct=0
for i in range(1,N+1):
  l=len(str(i))
  if l%2==1:
    ct+=1
print(ct)

Solution (Python):
n = int(input())
a = 0
for i in range(1, n+1):
    if len(list(str(i))) % 2 == 1:
        a += 1
print(a)

Solution (Python):
N=int(input())

step = sum([90*100**i for i in range(len(str(N))//2)])
dance_floor = sum([9*100**i for i in range(len(str(N))//2)])

ans = len(str(N))%2 * (N-step)  +  -1*(len(str(N))%2-1) * dance_floor
print(ans)

Solution (Python):
n=input()
ans=0
if len(n)==1:
    ans+=int(n)
elif len(n)%2==1:
    ans+=int(n)-10**(len(n)-1)+1
for i in range(1,len(n),2):
    ans+=9*10**(i-1)
print(ans)

Solution (Python):
n = int(input())

if 1 <= n <= 9:
    print(n)
elif 10 <= n <= 99:
    print(9)
elif 100 <= n <= 999:
    print(9 + (n - 99))
elif 1000 <= n <= 9999:
    print(9 + 900)
elif 10000 <= n <= 99999:
    print(9 + 900 + (n - 9999))
else:
    print(9 + 900 + 90000)

Solution (Python):
n = int(input())
count = 0
for i in range(1, n+1):
    if len(str(i)) % 2 == 1:
        count += 1
print(count)

Solution (Python):
n=input()
len_n=len(n)
i=1
ans=0
while(i<len_n):
    if i%2!=0:
        ans+=9*10**(i-1)
    i+=1
if len_n%2!=0:
    ans+=(int(n)-10**(len_n-1)+1)
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque, defaultdict


from collections import Counter

from itertools import accumulate,combinations,permutations,product

from heapq import heapify,heappop,heappush

from functools import reduce,lru_cache

from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def binr(x): return bin(x)[2:]
def bitcount(x): 
    x= x - ((x >> 1) & 0x5555555555555555)
    x= (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x= (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f 
    x+= (x >> 8); x+= (x >> 16); x+= (x >> 32) 
    return x & 0x7f

def main():
    mod = 1000000007
    

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




if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
ans = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        ans += 1
print(ans)

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

Solution (Python):
n = int(input())
cnt = 0
for i in range(n):
    if len(str(i+1))%2 != 0:
        cnt +=1
print(cnt)

Solution (Python):






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

Solution (Python):
n = int(input())
ans = 0

for i in range(1,n+1):
    if len(str(i))%2 == 1:
        ans += 1

print(ans)

Solution (Python):
N=int(input())
count=0
for i in range(1,N+1):
    if len(str(i))%2==1:
        count=count+1
    else:
        pass
print(count)

Solution (Python):
n = int(input())

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

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

Solution (Python):
N = input()
l = len(N)
ans = 0

if l == 1:
    ans = int(N)
elif l == 2:
    ans = 9
elif l == 3:
    ans =  int(N) + 9 - 99
elif l == 4:
    ans = 909
elif l == 5:
    ans = int(N)+ 909 - 9999
else:
    ans = 90909
    
print(ans)

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

Solution (Python):
n = input()
size = len(n)
n = int(n)
i = 1
ans = 0
while 2*i-1 < size:
  ans = ans + 9*(10**(2*i-2))
  i = i+1
if size%2==1:
  ans = ans + (n-10**(size-1)) + 1
  
print(ans)

Solution (Python):
N=int(input())
ans=0
l=len(str(N))
for i in range(l+1):
    if i!=l and i%2!=0:
        ans+=(10**i)-(10**(i-1))
    if i==l and i%2!=0:
        ans+=(N-(10**(i-1))+1)
print(ans)

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

Solution (Python):
n = int(input())
strDigits = [str(i) for i in range(1,n+1)]
oddCount = 0
for i in range(len(strDigits)):
    if len(strDigits[i]) % 2 == 1:
        oddCount += 1
print(oddCount)

Solution (Python):
n = int(input())
ans = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        ans += 1
print(ans)

Solution (Python):


n = int(input())

cnt = 0
for i in range(1, n+1):
    if len(str(i)) % 2 != 0:
        cnt += 1

print(cnt)

Solution (Python):
N = int(input())

ans = 0
for i in range(N):
    if len(str(i + 1)) % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
n = int(input())
counter = 0

for i in range(1, n+1):
  counter += 1 if len(str(i))%2==1 else 0

print(counter)

Solution (Python):
n = int(input())
ret = 0
for i in range(1, n+1):
    if i < 10:
        ret += 1
    elif 10**2 <= i < 10**3:
        ret += 1
    elif 10**4 <= i < 10**5:
        ret += 1
print(ret)

Solution (Python):
n = int(input())
res = 0
for i in range(6):
    if n // (10 ** i) >= 10 and (i + 1) % 2 == 1:
        res += 9 * (10 ** i)
    elif 1 <= n // (10 ** i) < 10 and (i + 1) % 2 == 1:
        res += ((n // (10 ** i)) - 1) * (10 ** i)
        res += (n % (10 ** i)) + 1 
print(res)

Solution (Python):
n=int(input())
ans=0
for i in range(1,n+1):
  if len(str(i))%2==1:
    ans=ans+1
print(ans)

Solution (Python):
n=int(input())
m=len(str(n))
cnt=0
for i in range(1,n+1):
    if len(str(i)) %2 ==1:
        cnt+=1
print(cnt)

Solution (Python):
n = int(input())
counter = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        counter += 1

print(counter)

Solution (Python):
a=int(input())
ans=0
for i in range(1,a+1):
  if len(str(i))%2==1:
    ans+=1
print(ans)

Solution (Python):
def main():
  n = int(input())
  ans=0
  for i in range(1,n+1):
    if len(str(i))%2==1:
      ans+=1
  print(ans)
main()

Solution (Python):
n = int(input())
count = 0

for i in range(1, n+1):
    if len(str(i)) % 2 == 1:
        count += 1

print(count)

Solution (Python):
n = int(input())
cnt = 0
for i in range(1,n+1):
    l = len(str(i))
    if l%2==1:
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())
count = 0
for i in range(1, n+1):
    if len(str(i)) % 2 == 1:
        count += 1
    
print(count)

Solution (Python):
print(sum([len(str(i))%2!=0 for i in range(1,int(input())+1)]))

Solution (Python):
n=int(input())
ans=0
for i in range(1,n+1):
  if len(str(i))%2==1:
    ans+=1
print(ans)

Solution (Python):
def abc136_b():
    n = int(input())
    cnt = 0
    for i in range(1, n + 1):
        if len(str(i)) % 2 == 1:
            cnt += 1

    print(cnt)

if __name__ == '__main__':
    abc136_b()

Solution (Python):
N=int(input())
arr=[]

a=N
while a>0:
    arr.append(a%10)
    a=a//10

keta=len(arr)

ans=0
for i in range(1,keta):
    if i%2==1:
        ans+=9*10**(i-1)
if keta%2==0:
    print(ans)
else:
    print(ans+N-(10**(keta-1)-1))

Solution (Python):
n = int(input())
count = 0
for i in range(n):
    if len(str(i + 1)) % 2 == 1:
        count += 1
print(count)

Solution (Python):
import sys
readline = sys.stdin.readline

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

Solution (Python):
n = int(input())

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

Solution (Python):
n = int(input())
c = 0
for i in range(n):
    if len(str(i+1)) % 2 == 1:
        c += 1
print(c)

Solution (Python):
n = int(input())

if n < 10:
    print(n)
elif 10 <= n < 100:
    print(9)
elif 100 <= n < 1000:
    print(9+(n-99))
elif 1000 <= n < 10000:
    print(9+900)
elif 10000 <= n < 100000:
    print(9+900+(n-9999))
elif 100000 <= n:
    print(9+900+90000)

Solution (Python):
n = int(input())
print(len(list(filter(lambda x : len(str(x)) % 2 & 1, range(1, n+1)))))

Solution (Python):
N=int(input())
ans=0
for x in range(1,N+1):
  if len(str(x))%2==1:
    ans+=1
print(ans)

Solution (Python):
N = int(input())

ans = 0
for i in range(1,N+1):
    if len(str(i)) % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
N = int(input())
count = 0
for n in range(1, N+1):
    if len(str(n)) % 2 == 1:
        count += 1
print(count)

Solution (Python):
N = int(input())
res = 0
for i in range(N):
  if  (i+1) // 100000 >= 1:
    pass
  elif (i+1) // 10000 >= 1:
    res +=1
  elif (i+1) // 1000 >= 1:
    pass
  elif (i+1) // 100 >= 1:
    res += 1
  elif (i+1) // 10 >= 1:
    pass
  else:
    res += 1
print(res)

Solution (Python):
N = int(input())
a = []
for i in range(1, N+1):
  if len(str(i))%2:
    a.append(i)
print(len(a))

Solution (Python):
a = int(input())
b = 0
for i in range(1,a+1):
    if len(str(i))%2 ==1:
        b +=1
print(b)

Solution (Python):
import sys
N = int(input())
Nlen = len(str(N))
ans = 0
if Nlen == 1:
    ans = N
elif Nlen == 2:
    ans = 9
elif Nlen == 3:
    ans = 9+N-99
elif Nlen == 4:
    ans = 9+900
elif Nlen == 5:
    ans = 9+900+N-9999
elif Nlen == 6:
    ans = 9+900+90000
print(ans)

Solution (Python):
N=int(input())
if len(str(N))==1:print(N)
elif len(str(N))==2:print(9)
elif len(str(N))==3:print(9+N-100+1)
elif len(str(N))==4:print(9+999-100+1)
elif len(str(N))==5:print(9+999-100+1+N-10000+1)
else:print(9+999-100+1+99999-10000+1)

Solution (Python):
n = int(input())
print(sum(len(str(i + 1)) % 2 for i in range(n)))

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

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

Solution (Python):
n = int(input())
count = 0
for i in range(1,n+1):
    if len(str(i)) % 2 != 0:
        count += 1
print(count)

Solution (Python):
N = int(input())
count = 0

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

Solution (Python):
n = int(input())
count=0
for i in range(1,n+1):
    if len(str(i))%2==1:
        count+=1
print(count)

Solution (Python):
"""
全探索
"""
n = int(input())
ans = 0
for num in range(1,n+1) :
    if len(str(num))%2 :
        ans += 1
print(ans)

Solution (Python):
N=int(input())
if N<10:
    print(N)
    exit()
if N<100:
    print(9)
    exit()
if N<1000:
    print(9+N-100+1)
    exit()
if N<10000:
    print(909)
    exit()
if N<100000:
    print(909+N-10000+1)
    exit()
if N==100000:
    print(90909)
    exit()

Solution (Python):
n=input()
s = int(n)

if len(n) <= 1:
    print(n)
if 2 <= len(n) <3:
    print(9)
if 3<= len(n) <4:
    print(s-99 + 9)
if 4 <= len(n) < 5:
    print(999-99+9)
if 5 <= len(n) < 6:
    print(s -9999 + 999 - 99 + 9)
if len(n) == 6:
    print(99999-9999 + 999 -99 +9)

Solution (Python):
def main():
    N = int(input())
    count = 0
    for i in range(1, N+1):
        a = str(i)
        b = len(a)
        if b%2!=0:
            count+=1
        else:
            count+=0
    print(count)
main()

Solution (Python):
N=int(input())
count=0
for i in range(1,N+1):
    a=str(i)
    b=len(a)
    if b%2!=0:
        count+=1
    else:
        count+=0
print(count)

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

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

Solution (Python):
import sys
import math

def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    count =0
    for i in range(1,N+1):
        if int(math.log10(i)) %2 ==0:
            count +=1
    print(count)



if __name__ == "__main__":
    main()

Solution (Python):
import sys
str_N = input()
N = int(str_N)

if not ( 1 <= N <= 10**5 ): sys.exit()

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

Solution (Python):
n = int(input())
keta = len(str(n))
if keta == 1:
    print(n)
elif keta == 2:
    print(9)
elif keta == 3:
    print(9+n-99)
elif keta == 4:
    print(909)
elif keta == 5:
    print(909+n-9999)
else:
    print(90909)

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

Solution (Python):
N = int(input())
x = 0

for i in range(1,N + 1):
    if len(str(i)) % 2 == 1:
        x += 1

print(x)

Solution (Python):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n = i()

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

Solution (Python):
S = int(input())
count = 0
for i in range(1, S+1):
    if len(str(i)) % 2 == 1:
        count += 1
print(count)

Solution (Python):
if __name__ == '__main__':
	n = int(input())

	cnt = 0
	for x in range(1,n+1):
		s = str(x)
		if len(s) % 2 == 1:
			cnt += 1

	print(cnt)

Solution (Python):
N = int(input())
 
cnt = 0
for i in range(1, N+1):
  if len(str(i)) % 2 == 1:
    cnt += 1
print(cnt)

Solution (Python):
N = int(input())
cnt = 0

for i in range(1,N+1):
    if len(str(i))%2 != 0:
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())

ans = 0
for i in range(1, n+1):
    if len(str(i)) % 2 == 1:
        ans = ans + 1
print(ans)

Solution (Python):
N = int(input())
ans = 0
for i in range(1,N+1):
  if len(str(i)) == 1 or len(str(i)) == 3 or len(str(i)) == 5:
    ans +=1
print(ans)

Solution (Python):
N = int(input())
ans = 0

if len(str(N)) % 2 != 0:
    sub = 10 ** (len(str(N))) - N - 1

    for i in range(len(str(N)), 0, -2):
        ans += 10 ** i - 10 ** (i-1)
    ans -= sub
    print(ans)
else:
    digits = len(str(N)) - 1
    for i in range(digits, 0, -2):
        ans += 10 ** i - 10 ** (i-1)
    print(ans)

Solution (Python):
import math
N = int(input())
print(sum([int(math.log10(x)) % 2 == 0 for x in range(1, N + 1)]))

Solution (Python):


N = int(input())

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

print(count)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1):
    ans += len(str(i))%2
print(ans)

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

Solution (Python):
def resolve():
    N = int(input())
    ans = 0
    for i in range(1, N+1):
        if len(str(i)) % 2 ==1:
            ans += 1
    print(ans)
    return

resolve()

Solution (Python):
L = [str(i) for i in range(1, int(input())+1)]
t = 0
for l in L:
  if len(l)%2!=0:
    t += 1
print(t)

Solution (Python):
n = int(input())

if n <= 99:
    print(min(9, n))
elif n <= 9999:
    print(9 + min(900, n - 99))
elif n <= 999999:
    print(9 + 900 + min(90000, n - 9999))

Solution (Python):
n = int(input())

if n <= 99:
    print(min(9, n))
elif n <= 9999:
    print(9 + min(900, n - 99))
elif n <= 999999:
    print(9 + 900 + min(90000, n - 9999))

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue

from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()

    ret = 0
    for n in range(1, N + 1):
        if len(str(n)) % 2 != 0 and len(str(n)) <= len(str(N)):
            ret += 1
    print(ret)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1):
  if len(str(i)) % 2 == 1:
    ans += 1
print(ans)

Solution (Python):
N = int(input())
c =0
for i in range(1,N+1):
  if len(str(i)) % 2 == 1:
    c+=1
print(c)

Solution (Python):
i = input()
ans = 0
for n in range(1,int(i)+1):
  if len(str(n)) % 2 != 0:
    ans += 1
print(ans)

Solution (Python):

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

print(ans)

Solution (Python):
S = int(input())
count = 0
for i in range(1, S+1):
    if len(str(i)) % 2 != 0:
        count = count + 1
print(count)

Solution (Python):
N = int(input())

def cnt_keta(n):
  keta = 0
  while n > 0:
    n //= 10
    keta += 1
  return keta

ans = 0
for i in range(1, N+1):
  if cnt_keta(i) % 2 == 1:
    ans += 1
print(ans)

Solution (Python):
def solve():
    ans = 0
    N = int(input())
    n = len(list(str(N)))
    if n%2==0:
        for i in range(1,n,2):
            ans += 10**(i-1)*9
    else:
        ans = N
        for i in range(2,n,2):
            ans -= 10**(i-1)*9
    return ans
print(solve())

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re











import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = int(input())
ans = 0
for i in range(1, n+1):
    if len(str(i)) % 2 == 0:
        continue
    ans += 1
print(ans)

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0
inf = float("inf")

n = k()

for i in range(1,n+1):
    if len(str(i))%2 == 1:
        count += 1

print(count)

Solution (Python):
n = int(input())
ans = 0
i = 1
for _ in range(1,n+1):
    if i > n: break
    if len(str(i))%2!=0: 
        ans += 1
        i += 1
    else:
        i *= 10
print(ans)

Solution (Python):


import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

n=I()
count=0
for i in range(1,n+1):
    if len(str(i))%2==1:
        count+=1
print(count)

Solution (Python):
N = int(input())
cnt = 0
for i in range(1,N+1):
    if len(str(i))%2==1:
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())
ans = 0
for i in range(1, n+1):
    if len(str(i)) % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
def count(n):
    c = 1
    while(n>=10):
        n = n//10
        c += 1
    return c
s = 0
n = int(input()) 
x = count(n)-1
for i in range(0,x,+2):
    s += 9*(10**i)
if (x+1) % 2:
    s += n-pow(10,x)+1
print(s)

Solution (Python):
N = int(input())

ans = 0
for i in range(1,N+1):
    for j in range(6):
        if 10 ** j <= i and i < 10**(j+1):
            if j % 2 == 0:
                ans += 1
                break

print(ans)

Solution (Python):
N = int(input())

ans = 0
for i in range(1,N+1):
    for j in range(6):
        if 10 ** j <= i and i < 10**(j+1):
            if j % 2 == 0:
                ans += 1
                break

print(ans)

Solution (Python):

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

Solution (Python):
def main():
    N = int(input())
    ans = 0
    for n in range(1, N + 1):
        if len(str(n)) % 2 == 1:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys

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

Solution (Python):
n=int(input())

ans=0
i=1

while i<=n:

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

    i+=1

print(ans)

Solution (Python):
S = input()
slen = len(S)
S = int(S)
count = 0
for i in range(0,slen, 2):
    if ( i == slen-1):
        inv = 1 if i == 0 else 10 ** i
        count = count + (S-inv) + 1
        
    else:
        count = count + 10 ** (i+1) - 10 ** (i)
        
print(count)

Solution (Python):
def resolve():
    N = int(input())
    ans = 0
    for i in range(1,N+1):
        if len(str(i))%2==1:
            ans += 1
    print(ans)

if '__main__' == __name__:
    resolve()

Solution (Python):
import sys, math
from collections import defaultdict
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

N = ri()

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

Solution (Python):
N = int(input())
count = 0
for i in range(1,N+1):
  if i<10 or 100<=i<1000 or 10000<=i<100000:
    count += 1
    
print(count)

Solution (Python):
n = int(input())
c = 0

while True:
  if n == 0:
    break
  else:
    x = len(str(n))
    if x%2 == 1:
      c += 1
  n -= 1
  
print(c)

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

Solution (Python):
n = input()
ans = 0
for i in range(0,len(n)):
  if i % 2 == 1:
    max_num = 10 ** i 
    min_num = 10 ** (i-1)
    ans +=  max_num - min_num
if len(n) % 2 == 1:
  ans += int(n) - (10 ** (len(n)-1) - 1)
print(ans)

Solution (Python):
n = int(input())
cnt = 0
for i in range(1, n+1):
    l = len(str(i))
    if l % 2 == 1:
        cnt +=1
print(cnt)

Solution (Python):
n=int(input())
ans=0
for i in range(1,n+1):
  if len(str(i))%2==1:
    ans+=1
print(ans)

Solution (Python):
n=int(input())
 
r=0
 
for i in range(1,n+1):
	if len(str(i))%2==1:
		r+=1
print(r)

Solution (Python):
N=int(input())
n=0
for i in range(1,N+1):
    list1=list(str(i))
    
    
    if len(list1)%2 != 0:
        n+=1
print(n)

Solution (Python):
n = int(input())

count = 0

for i in range(1, n+1):
    if (len(str(i)) % 2 != 0):
        count += 1

print(count)

Solution (Python):
n=int(input());ans=0
for i in range(1,n+1):
  if len(str(i))%2!=0:
    ans+=1
print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 0: continue
    ans += 1
print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(1, n+1):
  if len(str(i)) % 2 == 1:
    ans += 1
print(ans)

Solution (Python):
N = int(input())
   
count = 0
for n in range(0, N+1):
    if 1 <= n <= 9:
        count = count + 1
    if 100 <= n <= 999:
        count = count + 1
    if 10000 <= n <= 99999:
        count = count + 1
print(count)

Solution (Python):
N = int(input())
ans = 0

for i in range(1, N+1):
    if len(str(i)) % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
n  = int(input())

cnt = 0

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

Solution (Python):
n = int(input())
s=str(n)

if len(s)==1:
	print(n)
if len(s)==2:
	print(9)
if len(s)==3:
	print(9+n-99)
if len(s)==4:
	print(909)
if len(s)==5:
	print(909+n-9999)
if len(s)==6:
	print(90909)

Solution (Python):
n = int(input())

def d(k):
    s = 0
    while k > 0:
        k //= 10
        s += 1
    return s

dn = d(n)
a = 0
for i in range(1, dn + 1):
    if i % 2 == 1:
        if n < 10 ** i:
            a += n - 10**(i- 1) + 1
        else:
            a += 10 ** i - 10 ** (i - 1)
print(a)

Solution (Python):


import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n = ni()
    keta = len(str(n))
    if keta == 1:
        print(n)
    elif keta == 2:
        print(9)
    elif keta == 3:
        print(9 + (n - 99))
    elif keta == 4:
        print(9 + (999 - 99))
    elif keta == 5:
        print(9 + (999 - 99)  + n - 9999)
    else:
        print(9 + (999 - 99) + (99999 - 9999))

if __name__ == "__main__":
    main()

Solution (Python):
n = input()
count =0
for i in range(1,int(n)+1):
    if len(str(i)) % 2 != 0:
        count +=1 
print(count)

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

Solution (Python):
N = int(input())

if N < 100:
  print(min(N,9))
elif N < 10000:
  print(min(N - 90, 909))
elif N < 1000000:
  print(min(N - 9090, 90909))

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

Solution (Python):
N=int(input())
cnt=0

for i in range(1,N+1):
    if len(str(i))%2==1:
        cnt+=1
print(cnt)

Solution (Python):
n = int(input())
 
res = 0
for i in range(1, n+1):
    if len(str(i)) % 2 != 0:
        res += 1
print(res)

Solution (Python):
n = int(input())
a = 0
for i in range(1, n+1):
  b = len(str(i))
  if b%2==1:
    a += 1
print(a)

Solution (Python):
print(sum(len(str(n))%2==1 for n in range(1,1+int(input()))))

Solution (Python):
N = int(input())
print(sum(len(str(n))%2==1 for n in range(1,1+N)))

Solution (Python):
n = int(input())
a = 0
for i in range(1, n+1):
  b = len(str(i))
  if b%2==1:
    a += 1
print(a)

Solution (Python):
N = int(input())

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

Solution (Python):
N = int(input())

count = 0
for n in range(1, N+1):
    if len(str(n)) % 2 == 0:
        continue
    count += 1

print(count)

Solution (Python):
n = int(input())

ans = 0
for i in range(n):
    if len(str(i+1))%2 == 1:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
c = 0
for i in range(1,n+1):
    if len(str(i)) % 2 == 1 :
        c += 1

print(c)

Solution (Python):
n = int(input())
res = 0
for i in range(1, n + 1):
  if len(str(i)) % 2 == 1:
    res += 1
print(res)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1):
  if(len(str(i))%2):
    ans+=1
print(ans)