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())
if n < 10:
    print(n)
elif n<100:
    print(9)
elif n<1000:
    print(9+ n-100+1)
elif n<10000:
    print(9+900)
elif n<100000:
    print(9+900+ n-10000+1)
elif n<1000000:
    print(9+900+90000)

Solution (Python):
n = int(input())
ans = 0
i = 1
while(i <= n):
    ans += 1 if (len(str(i)) % 2 == 1) else 0
    i += 1
print(ans)

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

for i in range(1,a+1):
  if len(list(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))+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 == 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())
if N < 10:
    print(N)
elif N < 100:
    print(9)
elif N < 1000:
    print(N -90)
elif N < 10000:
    print(909)
elif N < 100000:
    print(N-9090)
elif N < 1000000:
    print(90909)
else:
    print(90910)

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

l = len(str(N))
ans = 0

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

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

Solution (Python):
import numpy as np
n = int(input())
count = 0
for i in range(1, n+1):
    if int(np.log10(i)) % 2 == 0:
        count += 1
print(count)

Solution (Python):
N = int(input())
import math
N_keta = int(math.log10(N))+1

count = 0
for i in range(N_keta-1):

  if i % 2 == 0:
    count += 9 * (10 ** i)  


if N_keta % 2 != 0:
  count +=  N - (10 ** (N_keta - 1) -1)
print(count)

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

Solution (Python):
n = input()



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

print(c)

Solution (Python):
n = int(input())
 
if  n <= 9:
    print(n)
elif 10 <= n <= 99:
    print(9)
elif 100 <= n <= 999:
    print(n-99+9)
elif 1000 <= n <= 9999:
    print(909)
elif 10000 <= n <= 99999:
    print(n-9999+909)
elif n == 100000:
    print(90909)

Solution (Python):
N = int(input())
l = len(str(N))
s = 0
for i in range((l + 1) // 2):
    s += 9 * 100 ** i
if l % 2:
    s -= int('9' * l) - N
print(s)

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

result = 0
if N >= 10:
    result += 9
else:
    result += N

if N >= 1000:
    result += 900
elif N >= 100:
    result += N - 99


if N >= 100000:
    result += 90000
elif N >= 10000:
    result += N - 9999

print(result)

Solution (Python):
a =  int(input())
count = 0
for i in range(a):
    result = str(i + 1)
    if len(result) % 2 == 1:
        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=ans+1
print(ans)

Solution (Python):
n=int(input())
if n<10:
  print(n)
elif n<100:
  print(9)
elif n<1000:
  print(n-90)
elif n<10000:
  print(909)
elif n<100000:
  print(n-9999+909)
else:
  print(90909)

Solution (Python):
n = int(input())
rank = len(str(n))
first = int(str(n)[0])

ans = 0

for i in range( rank ):
    if i % 2 != 0:
        ans += 9 * 10 ** (i-1)
if rank % 2 != 0:
    ans += ( first - 1 ) * (10 ** (rank-1))
    ans += n - first * ( 10 ** (rank-1) ) + 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):
a = input()
b = len(list(a))
c = int(a)
d = ''

if b % 2 == 0:
    d = '9' * (b // 2)
    print('0'.join(d))

else:
    if b == 1:
        print(a)
    else:
        d = '9' * (b // 2)
        d = '0'.join(d)
        d = int(d + '0')
        print(c - d)

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

digit = 1
count = 0

for i in range(1, n +1):
	if i // ( 10**digit ) > 0:
		digit += 1
	if digit % 2 == 1:
		count += 1

print(count)

Solution (Python):
N=int(input())
ans=0
if N//(10**1)>=1:
  ans+=9
else:
  ans+=N
  print(ans)
  exit()
if N//(10**3)>=1:
  ans+=900
else:
  if N>=100:
    ans+=N-99
    print(ans)
    exit()
  else:
    print(ans)
    exit()
if N//(10**5)==1:
  ans+=90000
  print(ans)
else:
  if N>=10000:
    ans+=N-9999
    print(ans)
  else:
    print(ans)

Solution (Python):
a = int(input())
count = 0
if a == 10**5:
    count += 90909
elif a >= 10000:
    count += a - 9999 +909
elif a > 999:
    count += 909
elif a >= 100:
    count += a - 99 + 9
elif a > 9:
    count += 9
else:
    count += a
print(count)

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

print(sum(1 if len(str(n))%2!=0 else 0 for n in range(1, N+1, 1)))

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

if N < 10:
    print(N)
elif N < 100:
    print(9)
elif N < 1000:
    print(N-99 + 9)
elif N < 10000:
    print(909)
elif N < 100000:
    print(N-9999 + 909)
else:
    print(90909)

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

if n >= 9: res += 9
else: res += n

if n >= 100:
    if n <= 999:
        res += n - 100 + 1
    else: res += 900

if n >= 10000:
    if n <= 99999:
        res += n - 10000 + 1
    else: res += 90000

print(res)

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

ans = 0
if n >= 10:
    ans += 9
if n >= 1000:
    ans += 900
if n >= 100000:
    ans += 90000

if n < 10:
    ans += n 

if n < 1000 and n >= 100:
    ans += n - 100 + 1

if n < 100000 and n >= 10000:
    ans += n - 10000 + 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())
c = 0

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

print(c)

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

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

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

Solution (Python):
N=int(input())
S=set([])
for i in range(1,N+1):
  if i<10 or 99<i<1000 or 9999<i<100000 :
    S.add(i)
print(len(S))

Solution (Python):


SELECT = "ABC"[1]

if SELECT == "A":  

    a, b, c = map(int, input().split())
    ans = c - (a - b)
    if ans < 0:
        print(0)
    else:
        print(ans)

if SELECT == "B":  

    n = int(input())

    length = len(str(n))
    if length % 2 == 0:
        ans = 0
        for i in range(0, length-1, 2):
            ans += 9 * 10 ** i
    else:
        ans = n
        for i in range(1, length, 2):
            ans -= 9 * 10 ** i
    print(ans)

    """
    if n == 100000:
        print(90909)
    elif (9999 < n) and (n < 100000):
        print(909 + n - 9999)
    elif (999 < n) and (n < 10000):
        print(909)
    elif (99 < n) and (n < 1000):
        print(9 + n - 99)
    elif (9 < n) and (n < 100):
        print(9)
    else:
        print(n)
    """

if SELECT == "C":  

    n = int(input())
    s = list(map(int, input().split()))
    bar = 0
    for i in range(n):
        if bar < s[i]:
            bar = s[i]
        elif s[i] + 1 < bar:
            print("No")
            exit()

    print("Yes")

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 i in range(1, N + 1):
    if len(str(i)) % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
N = int(input())
k = len(str(N))
sum = 0
if k%2==1:
    sum += N-10**(k-1)+1
    k -= 2
else:
    k -= 1
while k>0:
    sum += 9*10**(k-1)
    k -= 2
print(sum)

Solution (Python):

i =int(input())
ans = 0
for i in range(1,i+1):
    if len(str(i)) % 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())
c=0
for i in range(1,n+1):
    if len(str(i))%2==1:
        c+=1
print(c)

Solution (Python):
import sys
input = sys.stdin.readline
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())
count = 0
for i in range(1, n + 1):
    if i < 10 or 0 < i // 100 < 10 or 0 < i // 10000 < 10:
        count += 1
print(count)

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

if N>=10:
    result=9
elif N<10:
    result=N

if N>=1000:
    result+=900
elif 100<=N and N<1000:
    result+=N-100+1

if N>=100000:
    result+=90000
elif 10000<=N and N<100000:
    result+=N-10000+1

print(result)

Solution (Python):
N = input()
n = int(N)
digit = len(N)

if digit == 1:
    print(n)
elif digit == 2:
    print(9)
elif digit == 3:
    print(9 + (n - 100 + 1))
elif digit == 4:
    print(909)
elif digit == 5:
    print(909 + (n - 10000 + 1))
else:
    print(90909)

Solution (Python):


n = int(input())

if n < 10:
    print(n)
elif n < 100:
    print(9)
elif n < 1000:
    print(9+(n-100+1))
elif n < 10000:
    print(909)
elif n < 100000:
    print(909+(n-10000+1))
elif n == 100000:
    print(90909)

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

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

Solution (Python):
N = int(input())
if 0<=N and N<= 9:
  print(N)
elif 10<=N and N<=99:
  print(9)
elif 100<=N and N<=999:
  print(9+N-99)
elif 1000<=N and N<=9999:
  print(909)
elif 10000<=N and N<=99999:
  print(909+N-9999)
else:
  print(90909)

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

order=0
num=0

while True:
  if N // 10**order >=1:
    order += 1
  else:
    break
    
if order%2==1:
  order-=1
  num += N-(10**order)+1

while True:
  if order<=0: break
  if order%2==1:
    num += 9*(10**(order-1))
  order-=1
  
print(num)

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())
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())

ans=0
start=1
while(start<=n):
    same_dig_end=min(start*10-1,n)
    ans+=same_dig_end-start+1
    start*=100
print(ans)

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

keta = len(str(n))
ans = 0
for i in range(keta):
    if i+1 != keta and (i+1) % 2 == 1:
        ans += (10 ** i) * 9
    elif i+1 == keta and (i+1) % 2 == 1:
        ans += n - (10 ** i) + 1
print(ans)

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

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

print(cnt)

Solution (Python):
import math
N=int(input())
n=int(math.log(N,10)+1)
sum=0
for i in range(1,n,2):
    sum+=9*math.pow(10,i-1)
if n%2!=0:
    sum+=N-math.pow(10,n-1)+1
print(int(sum))

Solution (Python):
import math


N = int(input())

n = math.log(N,10) + 1
int_n = int(n)

sum = 0
for i in range(1, int_n, 2):
    sum += 9 * math.pow(10, i-1)

if int_n % 2 != 0:
    sum += N - math.pow(10,int_n-1)+1

print(int(sum))

Solution (Python):
import math


N = int(input())

n = math.log(N,10) + 1
int_n = int(n)

sum = 0
for i in range(1, int_n, 2):
    sum += 9 * math.pow(10, i-1)

if int_n % 2 != 0:
    sum += N - math.pow(10,int_n-1)+1

print(int(sum))

Solution (Python):
n = int(input())
length = len(str(n))

res = 0
if length == 1:
    print(n)
elif length == 2:
    print(9)
elif length == 3:
    print(9 + n - 99)
elif length == 4:
    print(900 + 9)
elif length == 5:
    print(9 + 900 + n - 9999)
else:
    print(9 + 900 + 90000)

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

Solution (Python):
s = input()
M = len(s)
N = int(s)

l1 = 9
l3 = 999-99
l5 = 99999-9999

ans = 0

if M == 1:
    ans = N
elif M == 2:
    ans = l1
elif M == 3:
    ans = l1 + N - 99
elif M == 4:
    ans = l1 + l3
elif M == 5:
    ans = l1 + l3 + N - 9999
elif M == 6:
    ans = l1 + l3 + l5

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())
ans=0
for i in range(1,n+1):
    if len(str(i))%2==1:
        ans+=1
print(ans)

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

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
l =[str(i) for i in range(1,n+1)]
for j in l:
  if len(j) % 2 ==1:
    cnt += 1
print(cnt)

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

Solution (Python):
N = input()

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

if len(N) % 2 != 0:
    ans += int(N) - 10 ** (len(N) - 1) + 1

print(ans)

Solution (Python):
import math

dp = [0, 9, 0, 0, 0, 0]
for i in range(2, 6):
	 if i&1:
	 	dp[i] = dp[i-1] + pow(10, i-1)*9
	 else:
	 	dp[i] = dp[i-1]

n = int(input())
max_pow = int(math.log10(n))

if max_pow&1:
	ans = dp[max_pow]
else:
	ans = n - pow(10, max_pow) + dp[max_pow] + 1
print(ans)

Solution (Python):
N = input()

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

if len(N) % 2 != 0:
    ans += int(N) - 10 ** (len(N) - 1) + 1

print(ans)

Solution (Python):
def digitCount(num):
  digits = 0
  while num > 0:
    digits += 1
    num = num // 10
  return digits

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

if __name__ == '__main__':
  main()

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

j=0
j += min(9, n)
if n >= 100:
    j += min(900, n-99)
if n>= 10000:
    j += min(90000, n-9999)


print(j)

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

if 1 <= n <= 99:
    print(min(n,9))
elif 100<= n <= 9999:
    print(min(n-90,909))
else:
    print(min(90909,n-10000+910))

Solution (Python):
import sys
from collections import deque
sys.setrecursionlimit(20000000)
input = sys.stdin.readline


def main():
    n = int(input())

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

    print(a)


if __name__ == '__main__':
    main()

Solution (Python):
count = 0

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

print(count)

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

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

Solution (Python):
n=int(input())
ans=0
if n>=9:
  ans+=9
else:
  ans+=n
if n>=999:
  ans+=900
else:
  ans+=max(0,n-99)
if n>=99999:
  ans+=90000
else:
  ans+=max(0,n-9999)
print(ans)

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

Solution (Python):
n = int(input())
a = 0
for i in range(1,n+1):
    if i//100000:
        pass
    elif i//10000:
        a += 1
    elif i//1000:
        pass
    elif i//100:
        a += 1
    elif i//10:
        pass
    elif i//1:
        a += 1
print(a)

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())
digits=len(str(n))
cnt=0
for i in range(int(digits/2)):
  cnt+=9*(10**(i*2))
if digits%2==1:
  cnt+=n-10**(digits-1)+1
print(cnt)

Solution (Python):
N = input()

length = len(N)

n = int(N)

ans = 0

for i in range(1,length):
    if i % 2 == 1:
        ans += 9*(10**(i-1))



if length % 2 == 1:
    ans += n-10**(length-1)+1

print(ans)

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

Solution (Python):
n=int(input())
ans=min(n,9)
if n>99: ans=min(n-90,909)
if n>9999: ans=n-9000-90
if n>99999: ans=90909
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):
def solve(string):
    base = int(string) if len(string) % 2 else 10**(len(string) - 1) - 1
    excepts = sum([9 * 10**(i - 1) for i in range(2, len(string), 2)])
    return str(base - excepts)


if __name__ == '__main__':
    print(solve(input()))

Solution (Python):
N = input()
ans = 0
if len(N) % 2 == 0:
    a = len(N) - 1
    for i in range(1, a+1, 2):
        ans += 9*(10**(i-1))
else:
    a = len(N) - 2
    for i in range(1, a+1, 2):
        ans += 9*(10**(i-1))
    ans += int(N) - 10**(len(N)-1) + 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
print(count)

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

for i in range(1,n+1):
    if (i >=1 and i <=9) or (i >= 100 and i <= 999) or (i >= 10000 and i <= 99999):
        ans += 1
print(ans)

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

for num in range(1, n+1, 1) : 
    if len(str(num)) % 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 = int(input())
if 10000<=N<=99999:
  print(N-9999+909)
elif 1000<=N<=9999:
  print(909)
elif 100<=N<=999:
  print(N-99+9)
elif 10<=N<=99:
  print(9)
elif N==100000:
  print(90909)
else:
  print(N)

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

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

print(count)

Solution (Python):
n = input()
i = int(n)
cnt = 0
ans = 0
while i >= 1:
  i = int(i) / 10
  cnt = int(cnt) + 1
if int(cnt) % 2 == 0:
  i = cnt / 2
  if i == 3:
      ans = 90000 + 900 + 9
  elif i == 2:
      ans = 900 + 9
  else :
      ans = 9
else :
  i = (int(cnt) / 2) + 1
  if i >= 3:
    ans = 9 + 900 + (int(n) - 10000) + 1
  elif i >= 2:
    ans = 9 + (int(n) - 100) + 1
  else :
    ans = int(n)
print(ans)

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

digit = 0;
tmp = N
while tmp > 0:
    tmp //= 10
    digit += 1

ans = 0
for i in range(1, digit, 2):
    ans += pow(10, i) - pow(10, i-1)
if digit%2 == 1:
    ans += N - pow(10, digit-1) + 1 

print(ans)

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

if dig%2==1:
    ans=n+1-10**(dig-1)
    dig-=2
    while dig>2:
        ans+=9*10**(dig-1)
        dig-=2 
else:
    dig-=1
    while dig>2: 
        ans+=9*10**(dig-1)
        dig-=2

if n>9:
    ans+=9

print(ans)

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())
ans = 0
for i in range(1,n+1):
  if len(str(i))%2 != 0:
    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+=1
print(count)

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

print(len(l))

Solution (Python):
a = int(input())
b = []

for i in range(1,a+1):
  i = str(i)
  if len(i) % 2 == 1:
    b.append(int(i))
print(len(b))

Solution (Python):
N = int(input())
cnt = 0
for i in range(1,N+1):
    if 0<=i<10 or 100<=i<1000 or 10000<=i<100000:
        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())
cnt = 0

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

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

print(n)

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())
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 i in range(n):
    if 0<i+1<10 or 99<i+1<1000 or 9999<i+1<100000:
        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):
count = 0
for i in range(1, int(input())+1):
    if len(list(str(i))) % 2 != 0:
        count += 1
print(count)

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

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):
import math
N = int(input())
ans = 0
for i in range(1, N+1):
    if(int(math.log10(i)+1)%2==1):
        ans+=1
print(ans)

Solution (Python):
n = int(input())
l = len(str(n))
count = 0
for i in range(1,l,2):
  count += (10**(i)-10**(i-1))
if l%2 == 1:
  count += (n-10**(l-1)+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):
import numpy as np
N=int(input())




list_a=np.arange(1, N+1)
list_b =[]





for i in list_a:
    if  len(str(i))%2 !=0:
        
        list_b.append(i)

print(len(list_b))

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

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

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

Solution (Python):

N = input()
length = len(N)
ans = 0
if length == 1:
    ans = int(N)
elif length == 2:
    ans = 9
elif length == 3:
    ans = 9 + int(N) - 99
elif length == 4:
    ans = 909
elif length == 5:
    ans = 909 + int(N) - 9999
elif length == 6:
    ans = 90909
print(ans)

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


if(N<10):
    print(N)
    sys.exit()

if(N<100):
    print(9)
    sys.exit()

if(N<1000):
    print(N-90)
    sys.exit()

if(N<10000):
    print(909)
    sys.exit()

if(N<100000):
    print(N-9090)
    sys.exit()

if(N==100000):
    print(90909)
    sys,exit()

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

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

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):
import sys
input = sys.stdin.readline

n = int(input())
ans = 0
for i in range(1, n + 1):
	x = str(i)
	if len(x) & 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):
def test():
    n = int(input())
    count = 0
    for i in range(1,n+1):
        if len(str(i)) % 2 == 1:
            count += 1
    print(count)



if __name__ == "__main__":
    test()

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

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

print(count)

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

const10000 = 90000
const100   = 900
const1     = 9

if 100000 == N:
    print(90909)
elif 10000 <= N:
    div10000, mod10000 = divmod(N,10000)
    res = const100 + const1 + (div10000-1)*10000 + mod10000 + 1
    print(res)
elif 1000 <= N:
    print(909)
elif 100 <= N:
    div100, mod100 = divmod(N,100)
    res = const1 + (min(10,div100)-1)*100 + mod100 + 1
    print(res)
elif 10 <= N:
    print(const1)
else:
    print(N)

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())
ans = 0
for n in range(1,N+1):
    if len(str(n)) % 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())
number = len(str(N))
count = 0

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

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

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

print(ans)

Solution (Python):
n = int(input())
if n <= 99:
  print(min(9, n))
elif n <= 9999:
  print(min(999, n)-90)
elif n <= 999999:
  print(min(99999, n)-9090)

Solution (Python):

N = int(input())

X = 0
for i in range(N + 1):
    if 0 < i and i < 10 or 100 <= i and i < 1000 or 10000 <= i and i < 100000:
        X += 1
    else:
        X += 0
print(X)

Solution (Python):
from math import log10


def main():
    N = int(input())

    index = int(log10(N))

    count = 0
    for i in range(1, index + 1, 2):
        count += 10**i - 10**(i - 1)

    if index % 2 == 0:
        count += N - 10**index + 1

    print(count)


if __name__ == '__main__':
    main()

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

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

print(T)

Solution (Python):
N = int(input())
count = 0
for num in range(1, N + 1):
    if len(str(num)) % 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 == 0: continue
    cnt+=1
print(cnt)

Solution (Python):
n = int(input())
count = 0 
for i in  range(n,0,-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())
odd = []
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        odd.append(i)
print(len(odd))

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=input()
N=N.split()
N=int(N[0])

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

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

if N < 10:
    print(N)
elif N < 100:
    print(9)
elif N < 1000:
    print(N - 90)
elif N < 10000:
    print(909)
elif N < 100000:
    print(N - 90 - 9000)
else:
    print(90909)

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

length = len(str(n))

temp = 10
ans = 0
for i in range(length-1):
    if i%2 == 0:
        ans += temp * 0.9
    temp *= 10

if length%2 == 1:
    ans += n - temp/10 + 1
print(int(ans))

Solution (Python):
import numpy as np

N=int(input())

counter=0
for i in range(1, N+1):
  if int(np.log10(i))%2==0:
    counter+=1
    
print(counter)

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

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

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

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):
import math
N=int(input())

length = int(math.log10(N))+1
sum_num=0

for i in range(length):
    if (i+1)%2!=0:
        if (i+1) != length:
            sum_num += 10**(i)*9
        else:
            sum_num += N-10**i+1
print(sum_num)

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):
print(sum(1 for i in range(1, int(input().strip())+1) if len(str(i))%2 == 1))

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

def count_digits(n):
    d=0
    while(n>0):
        d += 1
        n = n//10
    return d
c=0
for i in range(1,N+1):
    if (count_digits(i)%2==1):
        c += 1
print(c)

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):
import sys
input = sys.stdin.readline

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())
ans=0
ans+=min(9,N)
if N>99:ans+=min(900,N-99)
if N>9999:ans+=min(90000,N-9999)
print(ans)

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

N = int(input())
ans = 0
if N >= 10 ** 5:
    N = 10 ** 5 - 1
if N >= 10 ** 4:
    ans += N - 10 ** 4 + 1
if N >= 10 ** 3:
    N = 10 ** 3 - 1
if N >= 10 ** 2:
    ans += N - 10 ** 2 + 1
if N >= 10 ** 1:
    N = 10 ** 1 - 1
if N >= 10 ** 0:
    ans += N
print(ans)

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):
a = int(input())

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

print(cnt)

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

Solution (Python):
import sys

N = int(input())
digit = len(str(N))

if digit < 3:
    print(min((N), 9))

elif digit == 3:
    print(N-99+9)

elif digit == 4:
    print(999-99+9)

elif digit == 5:
    print(N-9999-99+999+9)

else:
    print(99999-9999-99+999+9)

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

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

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

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())
num = []


for i in range(1, n+1):
    num.append(str(i))

count = 0
for i in num:
    if len(i) % 2 == 1:
        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())
if n < 10:
    print(n)
elif n < 100:
    print(9)
elif n < 1000:
    print(9+(n-99))
elif n < 10000:
    print(9+900)
elif n < 100000:
    print(909+(n-9999))
else:
    print(90909)

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(N + 1):
  if len(list(str(i))) % 2 == 1:
    count += 1
print(count - 1)

Solution (Python):


N = int(input())

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