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


elif N < 10000:
    print(9 + 900)


elif N < 100000:
    print(9 + 900 + (N - 9999))

elif N == 100000:
    print(9 + 900 + 90000)

Solution (Python):
N = input()

Nketa = len(N)

if Nketa % 2 == 0:
    total = 0
    for i in range(1, Nketa, 2):
        idai = int('9' + '0'*(i-1))
        total += idai
    
elif Nketa % 2 == 1:
    total = 0
    for i in range(1, Nketa, 2):
        idai = int('9' + '0'*(i-1))
        total += idai
    
    Nstart = int('1' + '0'*(Nketa-1))
    total += int(N) - Nstart + 1

print(total)

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(9 + 900 + (N - 9999))
elif N == 100000: 
    print(9 + 900 + 90000)

Solution (Python):
n = int(input())
if n == 10**5:
    print(9+900+90000)
elif 10**4<=n<10**5:
    print(909+(n-9999))
elif 10**3<=n<10**4:
    print(909)
elif 10**2<=n<10**3:
    print(9+(n-99))
elif 10<=n<10**2:
    print(9)
else:
    print(n)

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

ans = list(range(1,n+1,1)) 

keta = [len(str(i)) for i in ans if len(str(i)) % 2==1]

print(len(keta))

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

count = 0

if N == 100000 :
  count = 90909
if N >= 10000 and N <= 99999 :
  count = N - 10000 + 1 + 900 + 9
if N >= 1000 and N <= 9999 :
  count = 909
if N >= 100 and N <= 999 :
  count = N - 100 + 1 + 9
if N >= 10 and N <= 99 :
  count = 9
if N >= 1 and N <= 9 :
  count = N

print(count)

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

Solution (Python):
a = input()
count=0

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

Solution (Python):
count = 0

n = int(input())

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

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

count = 0
if N < 10:
    count = N
elif 10 <= N < 100:
    count = 9
elif 100 <= N < 1000:
    count += 9
    count += N - 99
elif 1000 <= N < 10000:
    count += 999 - 99 + 9
elif 10000 <= N < 100000:
    count += 999 - 99 + 9
    count += N - 9999
else:
    
    count = 99999 - 9999 + 999 - 99 + 9

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

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

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

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

ANS=[0]*5
flag=0

if N<100000:
    if N<10000:
        if N<1000:
            if N<100:
                if N<10:
                    ANS[0]=int(N%10)
                    flag=flag+1
                ANS[1]=9
                flag=flag+1
            ANS[2]=9+N-100+1
            flag=flag+1
        ANS[3]=909
        flag=flag+1
    ANS[4]=9+900+N-10000+1
    flag=flag+1
elif N==100000:
    print(90909)

if flag==5:
    print(ANS[0])
if flag==4:
    print(ANS[1])
if flag==3:
    print(ANS[2])
if flag==2:
    print(ANS[3])
if flag==1:
    print(ANS[4])

Solution (Python):

N = int(input())
digit_count = len(str(N))
if digit_count == 1:
    print(N)
elif (digit_count % 2 == 1):
    print(N - int(str(90) * (digit_count//2)))
else:
    total = 0
    for i in range(0, digit_count//2):
        total += 9*(100**i)
    print(total)

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

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

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

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

Solution (Python):
n = int(input())
sum=0
dig = len(list(str(n)))

for i in range(1,dig+1):
    if i%2==1:
        if i==dig:
            sum+=(n-10**(i-1)+1)
        else:
            sum+=10**(i-1)*9

print(sum)

Solution (Python):

n = int(input())

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

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):
str = input()
num = int(str)
const = len(str)
numbers = len(str)
even = 0
con = 0
a = str[even:const]
b = int(a)
if numbers%2==1:
    pass
else:
    even += 1
    numbers -= 1
    a = str[even:const]
    b = int("9"*(numbers))
while numbers > 0:
    con += (b - 10**(numbers-1) + 1)
    even += 2
    numbers -= 2
    if numbers>0:
        a = str[even:const]
        b = int("9"*(numbers))
print(con)

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

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

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

Solution (Python):
n = int(input())
ans = 0
while (n > 0):
    len_n = len(str(n))
    numbers_on_that_digit = n - 10**(len_n-1)+1
    n -= numbers_on_that_digit
    if len_n % 2 == 1:
        ans+=numbers_on_that_digit

print (ans)

Solution (Python):


n= int(input())

sum = 0

while (n > 0):
    n_len = len(str(n))
    cnt = n - 10 ** (n_len - 1) + 1

    if n_len % 2 == 1:
        sum += cnt

    n -= cnt

print(sum)

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

Solution (Python):
from sys import stdin

[n] = [int(x) for x in stdin.readline().rstrip().split()]
c = 0

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

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

M=0

for i in range(1,6):
    if N<10**i:
        if i%2==1:
            M+=N-10**(i-1)+1
            break
        else:
            break

    else:
        if i%2==1:
            M+=9*(10**(i-1))


print(M)

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

Solution (Python):
N=int(input())
if 1<=N and N<10:
	print(N)
elif 10<=N and N<100:
	print("9")
elif 100<=N and N<1000:
	print(9+N-99)
elif 1000<=N and N<10000:
	print("909")
elif 10000<=N and 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())
print(len([i for i in range(1, n+1) if len(str(i)) % 2 == 1]))

Solution (Python):
S = input()
N = int(S)
ans = 0
if len(S) == 1:
    ans = N
if len(S) >= 2:
    ans += 9
if len(S) >= 4:
    ans += 900
if len(S) >= 6:
    ans += 90000
if len(S) == 3: 
    ans += N - 99    
if len(S) == 5:
    ans += N - 9999
print(ans)

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

count = 0

for i in range(6):                                                                                             
    if n >= 10**i and n < 10**(i+1):                                                                           
        for j in range(i+1):                                                                                   
            if j % 2 == 1:                                                                                     
                if j == 1:                                                                                     
                    count += 9                                                                                 
                else:                                                                                          
                    count += 10**j - 10**(j-1)                                                                 
        if i % 2 == 0:                                                                                         
            count += n - 10**i + 1                                                                             
                                                                                                               
        break                                                                                                  

print(count)

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

Solution (Python):
N_ori = int(input())
i = 1
N = N_ori
sum = 0
while True:
    N = N//10
    if i%2==1 and N >= 1:
        sum += 10**(i-1)*9
    elif i%2 == 1 and N < 1:
        sum += N_ori - 10**(i-1) + 1
    if N == 0:
        break
    i+=1
print(sum)

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

Solution (Python):
N=int(input())
A0=int(N/100000)
N0=N-A0*100000
A=int(N0/10000)
N1=N-10000*A
B=int(N1/1000)
N2=N1-1000*B
C=int(N2/100)
N3=N2-100*C
D=int(N3/10)
E=N3-10*D

if (A0 >0) :
    print(90909)
elif(A>0):
    print(909+int(N)-10000+1)
elif (B>0):
    print(909)
elif (C>0):
    print(9+int(N)-100+1)
elif (D>0):
    print(9)
else:
    print(int(N))

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

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

print(odd_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):
t = int(input())

total_diff = 0

for x in [1, 100, 10000]:
    diff = 0
    if t >= x:
        diff = t - x + 1
    if diff > x*9:
        diff = x*9
    total_diff+=diff

print(total_diff)

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

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(909)
elif N < 100000:
    print(909+N-9999)
elif N == 100000:
    print(90909)

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

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

if n < 10:
    k = n

if 10 <= n < 100:
    k = 9

if 100 <= n < 1000:
    k = n -90

if 1000 <= n < 10000:
    k = 909

if 10000 <= n < 100000:
    k = n - 9090

if n == 100000:
    k = n - 9091

print(k)

Solution (Python):
a=input()
b=len(a)
c=int(a)
if b==1:
    print(c)
elif b==2:
    print(9)
elif b==3:
    d=c-99+9
    print(d)
elif b==4:
    print(909)
elif b==5:
    e=c-9999+909
    print(e)
else:
    print(90909)

Solution (Python):
import math

n = int(input())
cnt = 0
for a in range(1, n+1):
    if int(math.log10(a)+1) % 2 == 1: cnt += 1
print(cnt)

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

if(n <= 9):
    print(n)

elif(n <= 99):
    print(9)

elif(n <= 999):
    print(n - 90)

elif(n <= 9999):
    print(909)

elif(n <= 99999):
    print(n - 9090)

else:
    print(90909)

Solution (Python):
N = int(input())
if N == 10**5:
  res = 90909
elif 10**4 <= N < 10**5:
  res = N-9090
elif 10**3 <= N < 10**4:
  res = 909
elif 10**2 <= N < 10**3:
  res = N-90
elif 10 <= N < 10**2:
  res = 9
elif 1 <= N < 10:
  res = N
print(res)

Solution (Python):
n=int(input())
s=0
if n >100000:
  print(error)
elif n<10:
  s=n
elif n>=10 and n<100:
  s=9
elif n>=100 and n<1000:
  s=9+n-100+1
elif n>=1000 and n<10000:
  s=9+900
elif n>=10000 and n<100000:
  s=9+900+n-10000+1
else:
  s=9+900+90000
print(s)

Solution (Python):
N = input()
L = len(N)
N = int(N)
C = 0
dig = 1
try:
    while dig < L:
        if dig % 2 == 1:
            C = C + 10 ** dig * 0.9
        else:
            C = C
        dig += 1

    if dig == L:
        if dig % 2 == 1:
            C = C + N - (10 ** (dig - 1) - 1)
        else:
            C = C

    print(int(C))
except:
    print("ERROR NO 2")
    import traceback
    traceback.print_exc()

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

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

print(count)

Solution (Python):
N = int(input())
leN = len(str(N))
counter = 0

for i in range(leN):
    if(i % 2 == 1):
        counter = counter + 10**(i) - 10**(i-1)

if(leN % 2 == 1):
    counter = counter + N - 10**(leN - 1) + 1

print(counter)

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

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

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

Solution (Python):
n=int(input())
count=0
for i in range(1,n+1):
        keta=str(i) 

        if len(keta)%2==1:
                count+=1
print(count)

Solution (Python):
import math

def main(N, d):
  if d == 1:
    return N
  elif d == 2:
    return 9
  elif d == 3:
    return 9 + (N - 99)
  elif d == 4:
    return 909
  elif d == 5:
    return 909 + (N - 9999)
  else:
    return 90909
 

N = int(input())
d = int(math.log10(N)) + 1

print(main(N, d))

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

digit = [5, 4, 3, 2, 1]
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(9 + 900 + N - 9999)
else:
    print(9 + 900 + 90000)

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

Solution (Python):
N = input()
sum = 0
for i in range(1, len(N), 2):
    sum += 10**i - 10**(i-1)

if len(N)%2 == 1:
    sum += int(N) - 10**(len(N)-1)+1

print(sum)

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

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

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

Solution (Python):
num=input()

digit=len(num)
DIGIT=digit
num=int(num)

count=0

while digit!=0:

    if digit%2==0:
        digit-=1
        continue
    if digit==DIGIT:
        count+=num-10**(digit-1)+1
    else:
        count+=10**(digit)-10**(digit-1)
    
    digit-=1


print(count)

Solution (Python):
import numpy as np

n = int(input())
k = list(range(1, n+1))
s = np.array([len(str(i)) for i in k])
print(len(np.where(s % 2 == 1)[0]))

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 N < 10:
    print(N)
elif 10 <= N and N < 100:
    print(9)
elif 100 <= N and N < 1000:
    print(N-90)
elif 1000 <= N and N < 10000:
    print(909)
elif 10000 <= N and N < 100000:
    print(N-9090)
elif 100000 == N:
    print(90909)

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

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

keta = len(str(N))
ans = 0
for i in range(1,6,2):
    if keta > i:
        ans += 9 * (10**(i-1))
    if keta == i:
        ans += N - (10**(i-1)) + 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())

n=len(str(N))//2
full=0
for i in range(n):
    full+=int('9'+'0'*i*2)

if len(str(N))%2==0:
    b=0
else:
    times=len(str(N))-1
    if times==0:
        nines=0
    else:
        nines=int('9'*times)
    b=N-nines
ans=full+b
print(ans)

Solution (Python):

"""
Created on Fri Aug  9 21:17:49 2019

@author: Yamazaki Kenichi
"""

N = input()
n = int(N)

S = '909090'
S2 = '090909'

if len(N) & 1:
    ans = n - int(S[-len(N):])
else:
    ans = int(S2[-len(N):])

print(ans)

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

if x <= 9:
  print(x)
elif x <= 99:
  print(9)
elif x <= 999:
  print(9+(x-99))
elif x <= 9999:
  print(909)
elif x <= 99999:
  print(909+(x-9999))
elif x==100000:
  print(90909)

Solution (Python):
n = int(input())
c=0
a = [i for i in range(n+1)]
for x in a:
  if len(str(x)) % 2 == 1:
    c += 1
    
print(c-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 math
N=int(input())
l = len(str(N))
if l == 1:
    print(N)
else:
    if l == 2:
        print(9)
    else:
        if l%2 == 1:
            a = [10**(l-i-2)-10**(l-i-3) for i in range(0,l+1,2)]
            print(math.floor(sum(a))+N-10**(l-1)+1)
        else:
            a = [10**(l-i-1)-10**(l-i-2) for i in range(0,l+1,2)]
            print(math.floor(sum(a)))

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

digit = len(N)
ans = 0

if digit != 1:
  ans = '09' * (digit // 2)
  ans = int(ans)

if digit % 2 == 1:
  ans += int(N) - 10**(digit - 1) + 1

print(ans)

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

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

cnt = 0
for i in range(n):
  digit = 0
  x = i+1
  while(x):
    x //= 10
    digit += 1
   
  if(digit % 2 == 1):
    cnt += 1
   
print(cnt)

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

Solution (Python):
N = [i for i in range(int(input())+1) if i < 10 or (99 < i and i < 1000) or 9999 < i and i < 100000]
print(len(N)-1)

Solution (Python):
N = int(input())
X_1 = 9
X_2 = 900
X_3 = 90000
if N < 10:
  X = N
elif N < 10**2:
  X = X_1
elif N < 10**3:
  X = (N - 99) + X_1
elif N < 10**4:
  X = X_1 + X_2
elif N < 10**5:
  X = (N - 9999) + X_1 + X_2
elif N == 10**5:
  X = X_1 + X_2 + X_3

print(X)

Solution (Python):
N = int(input())
n = len(list(str(N)))
if n >= 6:
  ans = 90909
elif n >= 5:
  ans = 909 + (N - 9999)
elif n >= 4:
  ans = 909
elif n >= 3:
  ans = 9 + (N - 99)
elif n >= 2:
  ans = 9
else:
  ans = N
print(ans)

Solution (Python):
import math

n = int(input())

k = math.floor(math.log10(n)) + 1

if k % 2 == 0:
    ks = k // 2
    ans = 9 * (100 ** ks - 1) // 99
else:
    ks = (k - 1) // 2
    ans = 9 * (100 ** ks - 1) // 99 + (n - 10**(k-1) + 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())
ret = 0
for i in range(0, 5, 2):
    if 10**i <= n:
        ret += n - 10**i + 1 if n < 10**(i + 1) else 10**(i + 1) - 10**i
    else:
        break
print(ret)

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())
ct = 0

if n <= 9:
	ct = n
elif n <= 99:
	ct = 9
elif n <= 999:
	ct = n - 90
elif n <= 9999:
	ct = 909
elif n <= 99999:
	ct = n - 9000  - 90
elif n == 100000:
	ct = 90909
	
print(ct)

Solution (Python):
a=int(input())
b=len(str(a))

ans=0

if b%2==0:
    for i in range(int(b/2)):
        c=1+i*2
        ans+=(10**c-(10**(c-1)))

else:
    ans+=(a-(10**(b-1))+1)
    for i in range(int((b-1)/2)):
        e=1+i*2
        ans+=(10**e-(10**(e-1)))

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

if N >= 10:
	ans = 9
	if N >= 1000:
		ans += 900
		if N == 100000:
			ans += 90000
		else:
			ans += max(0, N - 9999)
	else:
		ans += max(0, N - 99)
else:
	ans = N

print(ans)

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

ans = 0

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

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

print(ans)

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

str_n = len(str(n))
if str_n == 6:
	ans = 90909
elif str_n == 4:
	ans = 909
elif str_n == 2:
	ans = 9
elif str_n == 5:
	ans = 909 + n - 9999
elif str_n == 3:
	ans = 9 + n - 99
else:
	ans = n

print(ans)

Solution (Python):
n=int(input())
sum = 0
for i in range(1,n+1):
    length = 1
    num = i
    while num >= 10:
        num = num/10
        length += 1
    if (length % 2) == 1:
        sum += 1
print(sum)

Solution (Python):
n = int(input())
for i in range(5):
    if n == 100000:
        keta = 6
    elif 10**i <= n < 10**(i+1):
        keta = i+1
        break

if keta ==1:
    count = n
elif keta == 2:
    count = 9
elif keta == 3:
    count = 9 + (n - 99)
elif keta == 4:
    count = 9 + 900
elif keta == 5:
    count = 9 + 900 + (n - 9999)
else:
    count = 90909

print(count)

Solution (Python):

N = int(input())
A = 0
x = 1

if len(str(N))%2 == 0:
    for i in range(len(str(N))//2):
        A += 9*x
        x *= 100
    
    print(A)
else:
    A = N - 10**(len(str(N))-1) + 1
    
    for i in range((len(str(N))-1)//2):
        A += 9*x
        x *= 100
    
    print(A)

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

result = 0
if N < 10:
  result = N
elif N < 100:
  result = 9
elif N < 1000:
  result = 9 + (N - 100 + 1)
elif N < 10000:
  result = 9 + 900
elif N < 100000:
  result = 9 + 900 + (N - 10000 + 1)
else:
  result = 9 + 900 + 90000
print(result)

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

n = len(str(N))
if n == 1:
    print(N)
else:
    if n % 2 == 0:
        s = "90" * (n//2)
        print(s[:-1])
        
    else:
        s = "90" * ((n-1) // 2)
        ans = int(s[:-1]) + N - 10**(n-1) + 1
        print(ans)

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

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

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())
a = 0
i = 1
while N//i != 0:
    if N//(i*10) != 0:
        a += i*10 - i
        i = i*100
    else:
        a += N - i +1
        i = i*100
print(a)

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

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


print(ans)

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

Solution (Python):


n = int(input())



num = 0
for i in range(1, n+1):
  if len(str(i)) % 2 == 1:
    num = num +1
    
print("{}".format(num))

Solution (Python):
N=int(input())
h=len(str(N))
if h%2==1:
  a=N-(10**(h-1))+1
  a=a+((100**((h-1)//2))-1)//11
  print(a)
elif h%2==0:
  a=((100**(h//2))-1)//11
  print(a)

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

ans = min(9, N) + max(0, min(999, N) - 99) + max(0, min(99999, N) - 9999)

print(ans)

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

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(909)
elif N < 100000:
  print(9+900+N-9999)
else:
  print(90909)

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

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

print(ans)

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

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

count = 0
exc = {1:0, 3:99, 5:9999}
full = {1:9, 3:900, 5:90000}

for x in range(1, len(S) + 1, 2):
    if x == len(S):
        count += N - exc[x]
    else:
        count += full[x]

print(count)

Solution (Python):
num=input("")
count=0


for i in range(1,int(num)+1,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 == 1:
        ans += 1
print(ans)

Solution (Python):

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

Solution (Python):


N = int(input())
ketaCounter = 1
keta = 10
answer = 0

while N >= keta:
    ketaCounter += 1
    keta *= 10

for i in range(ketaCounter-1):
    ketaketa = i+1
    if ketaketa % 2 == 1:
        answer += 10 ** (ketaketa) - 10 ** (i) 
        

if ketaCounter == 1:
    answer += N
elif ketaCounter % 2 == 1:
    answer += N - 10 ** (ketaCounter-1) + 1
   
print(answer)

Solution (Python):
input_line = int(input())
keta = len(str(input_line))

suji = []
suji_2 = []
mojiretu = ''
mojire = ''
flug = 0

if keta%2 == 0:
    for i in range(keta-1):
        if i%2 == 0:
            suji.append('9')
        else:
            suji.append('0')

else:
    if keta == 1:
        print(input_line)
        exit()
    else:
        for i in range(keta-2):
            if i%2 == 0:
                suji.append('9')
            else:
                suji.append('0')
        flug = 1

for x in suji:
    mojiretu += x

for y in range(keta-1):
    suji_2.append('9')

for x in suji_2:
    mojire += x


if flug == 0:
    print(mojiretu)
else:
    input_line = input_line - int(mojire)
    print(int(mojiretu) + input_line)

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):
p=le=len([x for x in range(input()) if len(str(1+x))%2])
print p

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

Solution (Python):
N=int(input())
def ketasuu(n):
  keta=0
  while n>0:
    n//=10
    keta+=1
  return keta
N_keta=ketasuu(N)
ans=0
if N_keta%2==0:
  for i in range(1,N_keta//2+1):
    ans+=10**(2*i-1)-10**(2*i-2)
else:
  for i in range(1,N_keta//2+1):
    ans+=10**(2*i-1)-10**(2*i-2)
  ans+=N-10**(N_keta-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):
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())

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

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

Solution (Python):
ans = 0
a = int(input())
for i in range(1, a+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 += 1

print(count)

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

Solution (Python):
N = input()

result = 0
for i, n in enumerate(N[::-1]):
    idx = len(N) - i
    if idx % 2 == 0:
        continue
    else:
        if i == 0:
            result += int(N) - (10 ** (idx - 1)) + 1
        else:
            result += 9 * (10 ** (idx - 1))

print(result)

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

a = 0
if digit % 2 == 0:
  while digit > 0:
    if digit % 2 != 0:
      a += 10 ** digit - 10 ** (digit-1)
    digit -= 1
else:
  digit -= 1
  a += n - 10 ** (digit) + 1
  while digit > 0:
    if digit % 2 != 0:
      a += 10 ** digit - 10 ** (digit-1) 
    digit -= 1

print(a)

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

ans = int(0)

if n < 10:
  ans = n
if 100 > n and n >= 10:
  ans = 9
if 1000 > n and n >= 100:
  ans = n-90
if 10000 > n and n >= 1000:
  ans = 909
if 100000 > n and n >= 10000:
  ans = n-9090
if 100000 == n:
  ans = 90909

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(909)
elif N < 100000:
  print(909 + N - 9999)
else:
  print(90909)