import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            if (String.valueOf(i).length() % 2 != 0) r++;
        }
        System.out.println(r);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            if (String.valueOf(i).length() % 2 != 0) r++;
        }
        System.out.println(r);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            if (String.valueOf(i).length() % 2 != 0) r++;
        }
        System.out.println(r);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            if (String.valueOf(i).length() % 2 != 0) r++;
        }
        System.out.println(r);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int r = 0; r 0 for (int i = 1; i <= N; i++) {
            if (String.valueOf(i).length() % 2 != 0) r++;
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            if (String.valueOf(i).length() % 2 != 0) r++;
        } {
            if (String.valueOf(i).length() % 2 != 0) r++;
        } if (String.valueOf(i).length() % 2 != 0) r++; String.valueOf(i).length() % 2 != 0 String.valueOf(i).length() % 2 String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i 2 0 r++ r System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            if (String.valueOf(i).length() % 2 != 0) r++;
        }
        System.out.println(r);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            if (String.valueOf(i).length() % 2 != 0) r++;
        }
        System.out.println(r);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int r = 0;
        for (int i = 1; i <= N; i++) {
            if (String.valueOf(i).length() % 2 != 0) r++;
        }
        System.out.println(r);
    }
}