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



def main():
    n = int(input())
    res = sum(len(str(x)) % 2 for x in range(1, n + 1))
    print(res)


if __name__ == "__main__":
    main()

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

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
ans = 0
for i in range(1, n+1):
    temp = i
    cnt = 0
    while temp > 0:
        temp //= 10
        cnt += 1

    if cnt % 2:
        ans += 1

print(ans)

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

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 f(x):
    res = 0
    while x > 0:
        x //= 10
        res += 1
    return res


n = int(input())

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

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

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

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

Solution (Python):
def solve():
    n = read()
    result = think(n)
    write(result)


def read():
    return read_int(1)[0]


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(n):
    count = 0
    for i in range(n):
        if len(str(i + 1)) % 2 == 1:
            count += 1
    return count


def write(result):
    print(result)


if __name__ == '__main__':
    solve()

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):
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]





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

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    ans = 0
    for i in range(1, N+1):
        if len(str(i)) % 2 == 1:
            ans += 1
    return ans


def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()

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

Solution (Python):
a = int(input())
c = 0
for i in range(1, a + 1):
    b = str(i)
    c += 1 if len(b) % 2 == 1 else 0
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(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())
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):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()

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

  return c


print(main())

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

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

print(count)

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

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

Solution (Python):
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations

from itertools import accumulate
from bisect import bisect_left, bisect_right

import re







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


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e50)
MOD = int(1e9)+7 


def create_grid(H, W, value = 0):
    return [[ value for _ in range(W)] for _ in range(H)]



def main():
    
    
    N = i_inpl()
    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


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



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
N = int(input())
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):
    tmp = str(i)
    if len(tmp) % 2 ==1:
        cnt += 1
print(cnt)

Solution (Python):





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

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

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

    print(ans)

main()

Solution (Python):
def inpl():
    return list(map(int, input().split()))


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:
        ans += 1

print(ans)

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


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



import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7

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

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

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

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

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

print (count)

Solution (Python):

import sys


def solve(N: int):

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

    print(res)




def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

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

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

print(cnt)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
from functools import reduce
import sys
import math
import bisect
import random
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return list(map(float, sys.stdin.readline().split()))
def LS():return sys.stdin.readline().split()
def SR(n): return [list(sys.stdin.readline())[:-1] for i in range(n)]
def IR(n): return [int(sys.stdin.readline()) for i in range(n)]
def LIR(n): return [list(map(int, sys.stdin.readline().split())) for i in range(n)]
def LSR(n): return [list(map(list, sys.stdin.readline().split())) for i in range(n)]
_gcd = lambda x, y: _gcd(y, x%y) if (x%y) else y
_lcm = lambda x, y: x*y // _gcd(x, y)
def gcd(*numbers):
    return reduce(_gcd, numbers)
def lcm(*numbers):
    return reduce(_lcm, numbers)
sys.setrecursionlimit(1000000)
INF = float('inf')
mod = 1000000007
dire4 = [(1,0), (0,1), (-1,0), (0,-1)]
dire8 = [(1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)]

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

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

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

print(cnt)

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

print(c)

Solution (Python):
import numpy as np

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

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 permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

ans = 0

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

Solution (Python):

N = int(input())

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

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

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

Solution (Python):


import sys

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

solver = BUnevenNumbers()
input = sys.stdin.readline

solver.solve()

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

n = ni()

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

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):
    cnt += (len(str(i)) & 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())

cnt = 0

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

Solution (Python):
import os
import sys

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

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7






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

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

Solution (Python):











import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    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
import math
import collections
import itertools
def input(): return sys.stdin.readline().strip()
def gcd(x, y): return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y): return (x * y) // gcd(x, y)
MOD = 10 **9 + 7

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):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

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

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

print(ans)

Solution (Python):
n = int(input())
res = sum(1 for i in range(n) if len(str(i + 1)) & 1)
print(res)

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

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

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

Solution (Python):
import itertools
import math
from collections import defaultdict

def input_ints():
    return list(map(int, input().split()))

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


if __name__ == '__main__':
    solve()

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

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

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

print(ans)

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

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

print(count)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res

def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    a,b,c = LI()
    c -= a-b
    print(max(0,c))
    return


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


def C():

    return


def D():

    return


def E():

    return


def F():

    return


if __name__ == "__main__":
    B()

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
sys.setrecursionlimit(300000)


def solve(N: int):
    def dig(n):
        ret = 0
        while n > 0:
            ret += 1
            n //= 10
        return ret
    ret = 0
    for i in range(1, N + 1):
        if dig(i) % 2 == 1:
            ret += 1
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

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

Solution (Python):


import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 

n = int(input())



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

print(ans)

Solution (Python):


from collections import deque
import itertools as ite
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

N = 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)