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

x = len(str(n))

ans = 0

if x%2 == 0:
    for i in range(1,x+1,2):
        ans += 10**i*(9/10)
else:
    for i in range(1,x,2):
        ans += 10**i*(9/10)
    ans += n-10**(x-1)+1
    
print(int(ans))

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

ans = 0
for i in range(1, N + 1):
    n = len(str(i))
    if n % 2 != 0:
        ans += 1
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):
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())
counter = 0
for i in range(1, N+1):
    if len(str(i)) % 2 == 1:
        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):
def solve():
    n = int(input())
    ans = 0
    while True:
        if n == 0:
            break
        if len(str(n)) % 2 == 1:
            ans += 1
        n -= 1
    print(ans)


solve()

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

print(ans)

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

Solution (Python):


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

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

print(x)

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

cnt=0

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

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

print(cnt)

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

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

Solution (Python):
a=int(input())
if a<=9:
    ans=a
elif a<=99:
    ans=9
elif a<=999:
    ans=9+(a-99)
elif a<=9999:
    ans=909
elif a<=99999:
    ans=909+(a-9999)
else:
    ans=90909
print(ans)

Solution (Python):
N = input()
nlen = len(N)
n = int(N)
j = nlen
ans = 0
while j > 0:
    if j % 2 == 0:
        j -= 1
        continue
    else:
        if j == nlen:
            ans += n - 10**(j-1) + 1
        else:
            ans += 10**j - 10**(j-1)
        j -= 1
print(ans)

Solution (Python):

import sys
input = sys.stdin.readline
N = int(input())
count =0
digit =0
for i in range(1,N+1):
    digit =len(str(i))
    if digit %2 ==1:
        count +=1
print(count)

Solution (Python):
n = int(input())
 
ans = 0
for i in range(1, n+1):
  x = len(str(i))
  if x%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())
i = 0
ans = 0
while 10**(i+1) <= n:
  if i%2 == 0:
    ans += 10**i * 9
  i += 1

if i % 2 == 0:
  ans += n-(10**i) + 1
  
print(ans)

Solution (Python):
import sys
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]

N = ri()
m = len(str(N))
ans = 0
for i in range(0, 10, 2):
    if i == m - 1:
        ans += N - (10 ** i) + 1
        break
    elif i >= m:
        break
    else:
        ans += 9 * (10 ** i)
print(ans)

Solution (Python):
n=int(input())
l=[]
for i in range(1,n+1):
    l.append(i)

count=[]
keta=1

for i in range(n):
    if l[i]//10==0:
        count.append(keta)
    elif 1<=l[i]//10<=9:
        keta+=1
        count.append(keta)
        keta=1
    elif 10<=l[i]//10<=99:
        keta+=2
        count.append(keta)
        keta=1
    elif 100<=l[i]//10<=999:
        keta+=3
        count.append(keta)
        keta=1
    elif 1000<=l[i]//10<=9999:
        keta+=4
        count.append(keta)
        keta=1
    elif 10000<=l[i]//10<=99999:
        keta+=5
        count.append(keta)
        keta=1

c=0
for i in count:
    if i==1 or i==3 or i==5:
        c+=1
print(c)

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

if l == 1:
  print(n)
elif l == 2:
  print(9)
elif l == 3:
  print(n-90)
elif l == 4:
  print(909)
elif l == 5:
  print(n-9090)
else:
  print(90909)

Solution (Python):
N = int(input())
cnt = 0
for n in range(1,N+1):
    if len(str(n))%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):
def main():
    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())
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())
print(sum([len(str(i + 1)) % 2 for i in range(N)]))

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

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

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

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

print(cnt)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())
    sum=0
    for i in range(1,n+1):
        if 1<=i<10 or 100<=i<1000 or 10000<=i<100000:
            sum+=1
    print(sum)
resolve()

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

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

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

Solution (Python):



def solve(N):
    counter = 0
    for n in range(1,N+1):
        if(len(str(n)) % 2 == 1):
            counter+=1
    return counter
def main():
    N = int(input())
    
    print(solve(N))

if __name__ == "__main__":
    main()

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

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


def countKeta(num):
    count = 1
    while num / 10 >= 1:
        count += 1
        num = num // 10
    return count


count = 0

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

Solution (Python):
n=int(input())
a=len(str(n))
if a<2:
    print(n)
elif a<3:
    print(9)
elif a<4:
    print(n-90)
elif a<5:
    print(909)
elif a<6:
    print(n-9090)
else:
    print(90909)

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

ans = 0
for i in range(1, digit, 2):
        ans += 9 * (10**(i-1))

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

print(ans)

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

cnt, dig = 0, 1
for i in range(1, n+1):
    if pow(10, dig-1) <= i < pow(10, dig):
        pass
    else:
        dig += 1
    if dig % 2:
        cnt += 1
print(cnt)

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

for i in range(len(str(N))-1):
  if (i+1) % 2 == 1:
    cnt += 9*10**(i)

if len(str(N)) % 2 == 1:
  cnt += N - 10**(len(str(N))-1) + 1
print(cnt)

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

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

Solution (Python):

n=list(range(1,int(input())+1))

tf=[int(i) for i in n if (len(str(n[i-1])))%2==1]
print(len(tf))

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

Solution (Python):


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

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

    print(cnt)


main()

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

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

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

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

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

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

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

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=9+900
elif(n<100000):
  x=n-90-9000
elif(n==100000):
  x=90909
print(x)

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

    print(cnt)


main()

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 - 100 + 1)
elif n >= 1000 and n < 10000:
  print(909)
elif n >= 10000 and n < 100000:
  print(909 + n - 10000 + 1)
elif n == 100000:
  print(909 + 99999 - 10000 + 1)

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

    if length == 1:
        print(n)
    elif length == 2:
        print(9)
    elif length == 3:
        print(n - 90)
    elif length == 4:
        print(909)
    elif length == 5:
        print(n - 9090)
    else:
        print(90909)

main()

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

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

Solution (Python):
N = input()

if int(N) < 9:
  print(N)
  
elif len(N) == 1 or 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(90909)

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

cnt = 0
i = 0
for i in range(0, 5, 2):
  m = 10 ** i
  if len(str(m)) > len(str(N)):
    break
  M = int("9" * (i + 1))
  
  if M > N:
    M = N
  
  cnt += M - m + 1

print(cnt)

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

i = 1
cnt = 0

while i <= N:
  cnt += 1
  i += 1
  if len(str(i)) % 2 == 0:
    i *= 10
print(cnt)

Solution (Python):
N = input()
if(len(N)==1):
    print(N)
elif(len(N)==2):
    print(9)
elif(len(N)==3):
    print(int(N)-90)
elif(len(N)==4):
    print(999-90)
elif(len(N)==5):
    print(int(N)-9090)
else:
    print(90909)

Solution (Python):
import sys
input=sys.stdin.buffer.readline
N = int(input())
S = len(str(N))
cnt=0
for i in range(S,-1,-1):
    if i%2!=0:
        cnt=cnt+N-10**(i-1)+1
    else:
        N=10**(i-1)-1
print(cnt)

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

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

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

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())
c = 0
for i in range(1, n + 1):
    if 1 <= i <= 9 or 100 <= i <= 999 or 10000 <= i <= 99999:
        c += 1
print(c)

Solution (Python):
n = int(input())
l = [0, 9, 909, 90909]
if len(str(n)) % 2 == 1:
    print(l[len(str(n)) // 2] + n - 10 ** (len(str(n)) - 1) + 1)
else:
    print(l[len(str(n)) // 2])

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-9091)
else:
  print(n-9090)

Solution (Python):
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 






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 != 0:
        count += 1
print(count)

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




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

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

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

digits = 0
tmp = n
while tmp:
  tmp //= 10
  digits += 1

ans = 0
for i in range(digits//2):
  ans *= 100
  ans += 9
if digits % 2:
  ans += n - 10**(digits-1) + 1

print(ans)

Solution (Python):
n = int(input())
cnt = 0
for i in range(1,n+1):
    
    s = str(i)
    keta = len(s)
    if keta %2 == 0:
        pass
    else:
        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())

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

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())
cnt = 0
for i in range(1, n+1):
    if i <= 9:
        cnt += 1
    elif 100 <= i and i < 1000:
        cnt += 1
    
    elif 10000 <= i and i < 100000:
        cnt += 1

print(cnt)

Solution (Python):
n=input()
l=len(n)
m=int(n)
if l==1:
  a=m
elif l==2:
  a=9
elif l==3:
  a=9+(m-99)
elif l==4:
  a=9+900
elif l==5:
  a=9+900+(m-9999)
else:
  a=9+900+90000
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 = str(input())
ans = 0
for i in range(1, int(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())
res = []
for i in range(1, N + 1):
    if len(str(i)) % 2 != 0:
        res.append(i)
print(len(res))

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

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

print(ans)

Solution (Python):
N = int(input())
if N<=9:
  print(N)
elif N<=999:
  print(9+max(0,N-99))
elif N<= 99999:
  print(909+max(0,N-9999))
else:
  print(90909)

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(909)
elif len(N)==5:
  print(909+int(N)-9999)
elif len(N)==6:
  print(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())
count = 0
number = 0

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

Solution (Python):
import math
import itertools
import numpy as np

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

if __name__ == "__main__":
    solve()

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

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_str = input()
n = int(n_str)

d = len(n_str)
ans = 0
for i in range(1, d, 2):
    ans += 10 ** (i) - 10 ** (i - 1)
if d % 2 == 1:
    ans += n - 10 ** (d - 1) + 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())
keta=len(str(N))
l=[]

for i in range(1,keta)[::2]:

    l.append(9*(10**(i-1)))

if keta%2==1:
    l.append(N-(10**(keta-1))+1)

print(sum(l))

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N+1):
  keta = 0
  n = i
  for j in range(6):
    if n > 0:
      keta += 1
    n //= 10
  if keta % 2 == 1:
    ans += 1
print(ans)

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

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

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

Solution (Python):
n=input()
ans=0
for i in range(1,int(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):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

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

if __name__ == '__main__':
    main()

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

Solution (Python):

N = int(input())

count = 0

for i in range(1, N + 1):
    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())

ans = 0


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

print(ans)

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

i  = lambda: int(input())

N = i()

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

print(ans)

Solution (Python):
N = int(input())
d = len(str(N))
if d==1:
    print(N)
elif d==2:
    print(9)
elif d==3:
    print(9+N-99)
elif d==4:
    print(909)
elif d==5:
    print(909+N-9999)
elif d==6:
    print(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())
a = [9,900,90000]
order = len(str(n))
if order == 1:
    print(n)
elif order == 2:
    print(9)
elif order == 3:
    print(n-100+1 + 9)
elif order == 4:
    print(909)
elif order == 5:
    print(n-10000+1 + 909)
else:
    print(90909)

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):
  k=1
  x=i
  while(1):
    if x<10:
      break
    else:
      x=int(x/10)
      k+=1
  if k%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 = input()
a = len(n)
c = 0
for i in range(a - 1):
    if i % 2 == 0:
        c += 9 * 10 ** i
n = int(n)
if a % 2:
    c += n - 10 ** (a - 1 ) + 1
print(c)

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

print(count)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = input()

ans = 0
i = 1

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

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

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

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

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

print(count)

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

def findodds(n):
  m = []
  for i in range(1, n+1):
    if len(str(i))%2!=0:
      m.append(i)
  return len(m)
print(findodds(n))

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N, A, B = map(int, input().split())
A = list(map(int, input().split()))
A = np.array(input().split(), dtype=np.float64)
D = [int(input()) for _ in range(N)]
AB = [[int(x) for x in input().split()] for _ in range(N)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]
"""
N = int(input())

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

print(counter)

Solution (Python):
def isOdd(x : int) -> bool:
    if len(str(x)) % 2 == 1:
        return True
    else: return False

def main(): 
    n = int(input())
    cnt = 0
    for i in range(1, n+1):
        if isOdd(i):
            cnt += 1
    print(cnt)
if __name__ == "__main__":
    main()

Solution (Python):
import math
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  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):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
n = int(readline())

ans = 0

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

print(ans)

Solution (Python):
def I(): return int(input())
N = I()
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 != 0:
        count += 1

print(count)

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

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

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

print(x)

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

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

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

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

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

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

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

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

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

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):
c = 0
N = int(input())
for i in range(1,N+1):
  if i < 10 or (100 <= i and i <= 999) or (10000 <= i and i <= 99999):
    c += 1
print(c)

Solution (Python):
n = int(input())
import math
digit = int(math.log10(n))+1
ans = 0
if digit%2==0:
  for i in range(digit-1,0,-1):
    if i%2!=0: ans += (10**i-10**(i-1))
  print(ans)
else:
  ans = n-10**(digit-1)+1
  for i in range(digit-2,0,-1):
    if i%2!=0: ans += (10**i-10**(i-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())
digitlen, oddcount = 0, 0
for i in range(1, n + 1):
  digitlen = len(str(i))
  if (digitlen % 2 == 1):
    oddcount += 1
print(oddcount)

Solution (Python):
def digit(n):
    """桁数
    """
    return len(list(map(int, str(n))))

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

Solution (Python):
n = int(input())
count = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        count += 1
    else:
        continue
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)