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

Solution (Python):
n = int(input())
cnt = 0
while n>0:
    if len(str(n))%2!=0:
        cnt+=1
    n-=1
print(cnt)

Solution (Python):
num = [i for i in range (1,int(input())+1)]
ans = 0

if num[-1]<=9 :
	ans = num[-1]
elif num[-1]<=99 :
	ans = 9
elif num[-1]<=999 :
	ans = num[-1]-90
elif num[-1]<=9999:
	ans = 909
elif num[-1]<=99999 :
	ans = num[-1]-9090
else :
	ans = 90909

print(ans)

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

Solution (Python):
import math
n = int(input())
ans = 0
key = int(math.log10(n))+1
for i in range(1,key+1,2):
  ans += (min(10**i-1,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+=0
  else:
    ans+=1
print(ans)

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

Solution (Python):
A = input()
if len(A)%2 == 0 and len(A) / 2 == 1:
  print('9')
elif len(A) % 2 == 0 and len(A) / 4 == 1:
  print('909')
elif len(A) % 2 == 0 and len(A) / 6 == 1:
  print('90909')
elif len(A)%2 == 1 and len(A) / 1 == 1:
  print(A)
elif len(A)%2 == 1 and len(A) / 3 == 1:
  A = int(A)
  p = A%100 + 9
  p += ((A//100)-1)*100
  print(p+1)
elif len(A)%2 == 1 and len(A) / 5 == 1:
  A = int(A)
  p = A%10000 + 909
  p += ((A//10000)-1)*10000
  print(p+1)

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())
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))
else :
	print(9 + 900 + 90000)

Solution (Python):
N = int(input())
ans = 0
itr = 1
while(itr<=N):
    if itr < 10:
        ans += 1
    if 100 <= itr & itr < 1000:
        ans += 1
    if 10000 <= itr & itr <100000:
        ans+=1
    itr += 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 = str(n)
l = len(s)
ans = 0
for i in range(1,l+1):
  if i%2 == 1:
    if i<l:
      ans += 9*10**(i-1)
    else:
      ans += n-(10**(i-1)-1)
print(ans)

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

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

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

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

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

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=len(str(N))
if a==2:
  print(9)
elif a==4:
  print(909)
elif a==1:
  print(N)
elif a==3:
  print(N-90)
elif a==5:
  print(N-9090)
else:
  print(90909)

Solution (Python):
N = int(input())
if N < 100:
    print(min(9, N))
elif N < 10000:
    print(min(909, N-90))
else:
    print(min(90909, N-9090))

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

cnt = 0

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

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

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

Solution (Python):
N = input()

counter = 0

for _ in range(1, int(N)+1):
    if len(str(_)) % 2 != 0:
        counter += 1

print(counter)

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())
n = len(str(N)) 
if n == 1:
    print(N)
elif n == 2:
    print(9)
elif n == 3:
    print(N-90)
elif n == 4:
    print(909)
elif n == 5:
    print(N-9090)
elif n == 6:
    print(90909)
else:
    None

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 len(str(i))%2 != 0:
        count += 1

print(count)

Solution (Python):
N = int(input())
if N <= 9:
    ans = N
elif N <= 99:
    ans = 9
elif N <= 999:
    ans = N - 90
elif N <= 9999:
    ans = 909
elif N <= 99999:
    ans = N - 9090
else:
    ans = 90909
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):
lst=[str(_+1) for _ in range(int(input()))]
cnt=0
for l in lst:
    len_l=len(l)
    if len_l%2!=0:
        cnt+=1
print(cnt)

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

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

print(count)

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

for x in range(1,n+1):
  if(len(str(x)) % 2 != 0):
    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())
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(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))%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):
import sys
import math

if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

N = INT()

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

Solution (Python):
N = int(input())
L = len(str(N))

if L == 1 :
    print(N)
elif L == 2:
    print(9)
elif L == 3:
    print(9 + (N-10**2+1))
elif L == 4:
    print(909)
elif L == 5:
    print(9 + 900 + (N-10**4+1))
else:
    print(90909)

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

count=0

for i in range(N+1):
    if i>=1:
        if len(str(i))%2==1:
            count+=1
        else:
            pass
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(n - 90)
elif keta == 4:
    print(909)
elif keta == 5:
    print(n - 9090)
elif keta == 6:
    print(90909)

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):
a=int(input())
if a < 10:
    print(a)
elif a<10**2:
    print(9)
elif a<10**3:
    print(9+a%100+1)
elif a<10**4:
    print(909)
elif a<10**5:
    print(909+a-9999)
else:
    print(90909)

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

if N / 10 < 1:
	print(N)
elif N / 10 >= 1 and N / 100 < 1:
	print(9)
elif N / 100 >= 1 and N / 1000 < 1:
	print(9 + N - 99)
elif N / 1000 >= 1 and N / 10000 < 1:
	print(9 + 900)
elif N / 10000 >= 1 and N / 100000 < 1:
	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 = input()
ni = int(N)
count = 0
for i in range(1, ni + 1):
  iilen = len(str(i))
  if iilen % 2 != 0:
    count += 1
print(count)

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

count = 0
for i in range(1, N_len+1):
    if i % 2 == 0:
        continue
    else:
        if i == N_len:
            count += (n - 10**(N_len-1) + 1)
        elif i == 1:
            count += 9
        else:
            count += (10**(i) - 10**(i-1))
print(count)

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

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

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

print(flg)

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 1<= n < 10:
    print(n)
elif 10<= n < 100:
    print(9)
elif 100<= n <1000:
    print(9+n-99)
elif 1000<= n < 10000:
    print(909)
elif 10000<= n <100000:
    print(909+n-9999)
else:
    print(90909)

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

count = 0
for i in range(1, N + 1):
    num_dig = 0
    ii = i
    while ii > 0:
        ii = int(ii / 10)
        num_dig += 1
    if num_dig % 2 != 0:
        count += 1

print(count)

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

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

print(count)

Solution (Python):

N = int(input())
ans = 0

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

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

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

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

Solution (Python):
def cal_digit(n):

    digit = 0

    while(n > 0):
        n //= 10
        digit += 1

    return digit

def solve(N):

    ans = 0

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

        if(cal_digit(i)%2 == 1):
            ans += 1
        
        
    
    return ans

N = int(input())
print(solve(N))

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

for i in range(1,N+1):
    count = 0

    while i != 0:
        i = i//10
        count += 1
    
    if count % 2 == 1:
        count_N += 1

print(count_N)

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))
else:
    print(9 + 900 + 90000)

Solution (Python):
n=int(input())
l=[x+1 for x in range(n)]
cnt=0
for num in l:
  s=str(num)
  if len(s)%2!=0:
    cnt+=1
print(cnt)

Solution (Python):
i=int(input())
l=[x+1 for x in range(i)]
cnt=0
for num in l:
  s=str(num)
  if(len(s))%2!=0:
    cnt+=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):
n=int(input())
c=0
for i in range(1,n+1):
    if len(str(i))%2: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):
N = int(input())
ans = 0
for i in range(N + 1):
    if i == 0:
        continue
    elif len(str(i)) % 2 == 1:
        ans += 1
    else:
        continue
print(ans)

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

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

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())
hako = []
ans = 0
for i in range(N):
    hako.append(N-i)
for k in range(N):
    nakami = hako[k]
    if len(str(nakami))%2 >= 1:
        ans += 1
print(ans)

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

digit = len(str(N))

ans  = 0
num = [9, 0, 900, 0, 90000]
if digit%2 == 1:
    ans += sum(num[:digit-1])
    ans += N - 10 ** (digit-1) + 1
else:
    ans += sum(num[:digit-1])

print ans

Solution (Python):
N=int(input())
if N<10:
  A=N
elif N<100:
  A=9
elif N<1000:
  A=9+N-99
elif N<10000:
  A=9+900
elif N<100000:
  A=9+900+N-9999
else:
  A=9+900+90000  
print(A)

Solution (Python):
n = input()

counter = 0
for val in range(1,int(n)+1):
    if len(str(val))%2 != 0:
        counter +=1

print(counter)

Solution (Python):
def main():
    i = list(map(int, input().split()))
    n = i[0]

    if not (1 <= n and n <= 10**5):
        return

    num = 0
    for j in range(n):
        if(len(str(j+1)) % 2 != 0):
            num += 1

    print(num)

if __name__ == "__main__":
    main()

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    
    n = int(input())
    ans = 0
    for i in range(1, n + 1):
        if len(str(i)) % 2 == 1:
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
K = len(str(N))
if K % 2 == 0:
  NN = 10**(K-1) - 1
else:
  NN = N
KK = len(str(NN))
if KK == 1:
  print(NN)
else:
  print(NN-int('90'*int((KK-1)/2)))

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

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 len(str(n))==2:
  print(9)
elif len(str(n))==4:
  print(909)
elif len(str(n))==6:
  print(90909)
elif len(str(n))==1:
  print(n)
elif len(str(n))==3:
  print(n-90)
else:
  print(n-9090)

Solution (Python):
n=int(input())
d=len(str(n))
ans=0
if d%2==1:
  ans+=n-100**(d//2)+1
for i in range(1,d)[::2]:
  ans+=9*100**(i//2)
print(ans)

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

result = 0

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

print(result)

Solution (Python):
import collections

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

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

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

print(ans)

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

for i in range(1, n+1):
  num = [int(x) for x in list(str(i))]
  if (len(num) % 2) == 1:
    count = count + 1
    
print(count)

Solution (Python):
n=input()
L=[9,0,900,0,90000]
ans=0
if len(n)==1:ans=int(n)
else:
    for i in range(len(n)-1):
        ans+=L[i]
    if len(n)%2!=0:ans+=int(n)-int("9"*max(0,len(n)-1))
print(ans)

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

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

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

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

buf = 0

if len(str(N)) % 2 != 0 : 
    buf += N - 10**(len(str(N))-1) +1
    for i in range((len(str(N))-1)//2) :
        buf += 9 * (100**(i))

else : 
    for i in range(len(str(N))//2) :
        buf += 9*(100**i)

print(buf)

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

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

print(count)

Solution (Python):

n = int(input())

odd_digits = 0

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

print(odd_digits)

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

if n <=9:
  res = n
elif n <= 99:
  res = 9
elif n <= 999:
  res = 9 + (n - 100 + 1)
elif n <= 9999:
  res = 909
elif n <= 99999:
  res = 909 + (n - 10000 + 1)
else:
  res = 90909

print(res)

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

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):
    s_i = str(i)
    if len(s_i) % 2:
        cnt += 1

print(cnt)

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

ans = 0
digit = len(str(n))



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


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())
l = []
for i in range(0, 6, 2): 
        l += [x for x in range(10**i, 10**(i+1))]
print(sum(i <= n for i in l))

Solution (Python):
n = int(input())
l = [i for i in range(1, 10)] + [i for i in range(10**2, 10**3)] + [i for i in range(10**4, 10**5)]
print(sum(i <= n for i in l))

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())
p=len(str(N))
if p%2==0:
  answer=0
  for i in range(0,p,2):
    answer +=9*(10**i)
else:
  answer=0
  for i in range(0,p-1,2):
    answer +=9*(10**i)
  answer += N-10**(p-1)+1
print(answer)

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 len(str(i)	)%2 != 0:
		ans +=1

print(ans)

Solution (Python):

import sys

import math








def main():
    n = int(sys.stdin.readline().rstrip())

    digits = math.floor(math.log10(n))
    if  digits % 2 == 0:
        ans = n
    else:
        ans = 10 ** digits - 1
        
    for i in range(1, digits, 2):
        ans -= 10 ** (i+1) - 1 - 10 ** i + 1
    
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):

import sys

import math








def main():
    n = int(sys.stdin.readline().rstrip())

    if  math.floor(math.log10(n)) % 2 == 0:
        ans = n
    else:
        ans = 10 ** (math.floor(math.log10(n))+1) - 1
    for i in range(1, math.floor(math.log10(n)+1), 2):
        ans -= 10 ** (i+1) - 1 - 10 ** i + 1
    
    print(ans)

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

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
digit = 0
while n >= 10**digit:
    if digit % 2 == 1:
        pass
    else:
        ans += min(n,10**(digit+1)-1) - 10**digit +1
    digit += 1
print(ans)

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

Solution (Python):
from collections import defaultdict,deque, Counter
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
ans = 0
n = inp()
if 0<n and n<=9:
    ans = n
elif 10 <= n and n < 100:
    ans = 9
elif 100<= n and n<1000:
    ans = n-99+9
elif 1000 <= n and n < 10000:
    ans = 9+900
elif 10000<= n and n < 100000:
    ans = n- 9999 +900 +9
elif n == 100000:
    ans = 9+900+90000
print(ans)

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

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

digit = int(len(n))

odd_number = 0




for i in range(1 , digit+1):
    if i % 2 == 1 and i != digit:
        odd_number += 10**i - 10**(i-1)
    if i % 2 == 1 and i == digit:
        odd_number += N - 10**(i-1) + 1

print(odd_number)

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

Solution (Python):

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

def main():
    N = int(input())
    
    for n in range(6,0,-1):
        if N >= 10**(n-1):
            d=n
            break
    ans = 0
    while d > 0:
        if d%2:
            ans += N - 10**(d-1) + 1
        d -= 1
        N = 10**d - 1
    print(ans)


if __name__ == '__main__':
    main()

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

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

if 1 <= 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):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b



def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2



def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)



def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline
def print_ans(N):
    """Test Case
    >>> print_ans(11)
    9
    >>> print_ans(136)
    46
    >>> print_ans(100000)
    90909
    """
    counter = 0
    for i in range(1, N + 1):
        if len(str(i)) % 2 != 0:
            counter +=1
    print(counter)


if __name__ == '__main__':
    N = int(input().rstrip())
    print_ans(N)

Solution (Python):
import sys
input = sys.stdin.readline
def print_ans(N):
    """Test Case
    >>> print_ans(11)
    9
    >>> print_ans(136)
    46
    >>> print_ans(100000)
    90909
    """
    counter = 0
    for i in range(1, N + 1):
        if len(str(i)) % 2 != 0:
            counter +=1
    print(counter)

if __name__ == '__main__':
    N = int(input().rstrip())
    print_ans(N)

Solution (Python):
n = int(input())
numbers = list(str(i) for i in range(1,n+1))

count = 0
for number in numbers:
    if len(number)%2==1:
        count += 1
print(count)

Solution (Python):
a=int(input())
lis=[]
for i in range(1,a+1):
    lis.append(str(i))
cnt=0
for i in lis:
    if len(i)%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(N - 90)
elif N < 10000:
	print(909)
elif N < 100000:
	print(N - 9090)
else:
	print(90909)

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 == 100000:
    print(90909)

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

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

Solution (Python):
import math
import heapq
from collections import Counter




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

cnt = 0
for i in range(1, n+1):
    if len(str(i)) % 2 == 1:
        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 8 >= N >= 1:
  print(N)
elif 99 >= N >= 9:
  print(9)
elif 999 >= N >= 100:
  print(N - 90)
elif 9999 >= N >= 1000:
  print(909)
elif 99999 >= N >= 10000:
  print(N - 9090)
elif N == 100000:
  print(90909)

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

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

ans = 0

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

Solution (Python):


n = int(input())
d = len(str(n))
ans = 0

if d == 1:
  print(n)
else:
  for i in range(1, d+1):
    if i % 2 == 0:
      continue

    if i == d:
      ans += n - (10**(i-1)) + 1
      break;

    if i == 1:
      ans += 9
    else:
      ans += (10**i) - (10**(i-1))

  print(ans)

Solution (Python):
import math

N = int(input())

ans = 0

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

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

Solution (Python):
n=int(input())
m=str(n)
minus1=10**(len(m)-2)*9
minus=minus1
if len(m)==1:
    print(n)
elif len(m)%2==0:
    for i in range(len(m)//2):
        minus1+=minus//(100**(len(m)//2-i))
    print(minus1)
else:
    for i in range(len(m)//2):
        minus1+=minus//(100**(len(m)//2-i))
    print(minus1//10+n-10**(len(m)-1)+1)

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>=10 and n<100:
    print(9)
elif n>=100 and n<1000:
    print(9+n-99)
elif n>=1000 and n<10000:
    print(909)
elif n>=10000 and n<100000:
    print(909+n-9999)
else:
    print(90909)

Solution (Python):
N = int( input() )
c = 0
import math
for i in range(1, N+1 ):
    if ( int( math.log10( i ) ) ) % 2 == 0:
        c += 1
print(c)

Solution (Python):
n = input()

num = int(n)

s = 0

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

print(s)

Solution (Python):



ans = 0
n = int(input())
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())

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

print(ans)

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

if len(s) == 1:
    count = N
elif len(s) == 2:
    count = 9
elif len(s) == 3:
    count = N - 90
elif len(s) == 4:
    count = 909
elif len(s) == 5:
    count = N - 9090
elif len(s) == 6:
    count = 90909
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 (i < 10) or (100 <= i <1000) or (10000 <= i < 100000):
        count += 1
print(count)

Solution (Python):
N = int(input())
sum = 0
for i in range(1, N + 1):
  if i < 10:
    sum += 1
  elif 99 < i < 1000:
    sum += 1
  elif 9999 < i < 100000:
    sum += 1
print(sum)

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

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

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(909)
elif(10000<=n<=99999):
  print(909+n-9999)
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())

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

print(ans)

Solution (Python):

import math

def main():
    N = int(input())
    count = 0
    for i in range(N):
        str_num = str(i+1)
        if len(str_num)%2 != 0:
            count += 1
    print(count)
    
    

if __name__ == "__main__":
    main()

Solution (Python):
N=input()
if len(N)==1:
    print(int(N))
elif len(N)==2:
    print(9)
elif len(N)==3:
    print(9+int(N)-99)
elif len(N)==4:
    print(9+900)
elif len(N)==5:
    print(9+900+int(N)-9999)
else:
    print(9+900+90000)