
import java.util.*;

import javax.print.attribute.standard.DialogTypeSelection;

class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int count = 0;
        for(int i = 1; i <= n; i++){
            if(((int)(Math.log10(i)) + 1) % 2 == 1) count++;
        }
        System.out.println(count);
    }
} import java.util.*; util.* java import javax.print.attribute.standard.DialogTypeSelection; DialogTypeSelection javax.print.attribute.standard class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int count = 0;
        for(int i = 1; i <= n; i++){
            if(((int)(Math.log10(i)) + 1) % 2 == 1) count++;
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int count = 0;
        for(int i = 1; i <= n; i++){
            if(((int)(Math.log10(i)) + 1) % 2 == 1) count++;
        }
        System.out.println(count);
    } main {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int count = 0;
        for(int i = 1; i <= n; i++){
            if(((int)(Math.log10(i)) + 1) % 2 == 1) count++;
        }
        System.out.println(count);
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int count = 0; count 0 for(int i = 1; i <= n; i++){
            if(((int)(Math.log10(i)) + 1) % 2 == 1) count++;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            if(((int)(Math.log10(i)) + 1) % 2 == 1) count++;
        } {
            if(((int)(Math.log10(i)) + 1) % 2 == 1) count++;
        } if(((int)(Math.log10(i)) + 1) % 2 == 1) count++; ((int)(Math.log10(i)) + 1) % 2 == 1 ((int)(Math.log10(i)) + 1) % 2 ((int)(Math.log10(i)) + 1) (int)(Math.log10(i)) Math.log10 Math i 1 2 1 count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args

import java.util.*;

import javax.print.attribute.standard.DialogTypeSelection;

class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int count = 0;
        for(int i = 1; i <= n; i++){
            if(((int)(Math.log10(i)) + 1) % 2 == 1) count++;
        }
        System.out.println(count);
    }
}