
public class Main {

    public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);

        int n = sc.nextInt();

        int count = 0;

        for (int i = 1; i <= n; i++) {
            if (("" + i).length() % 2 == 1) {
                count++;
            }
        }

        System.out.println(count);

    }

} public class Main {

    public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);

        int n = sc.nextInt();

        int count = 0;

        for (int i = 1; i <= n; i++) {
            if (("" + i).length() % 2 == 1) {
                count++;
            }
        }

        System.out.println(count);

    }

} Main public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);

        int n = sc.nextInt();

        int count = 0;

        for (int i = 1; i <= n; i++) {
            if (("" + i).length() % 2 == 1) {
                count++;
            }
        }

        System.out.println(count);

    } main {

        java.util.Scanner sc = new java.util.Scanner(System.in);

        int n = sc.nextInt();

        int count = 0;

        for (int i = 1; i <= n; i++) {
            if (("" + i).length() % 2 == 1) {
                count++;
            }
        }

        System.out.println(count);

    } java.util.Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int i = 1; i <= n; i++) {
            if (("" + i).length() % 2 == 1) {
                count++;
            }
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            if (("" + i).length() % 2 == 1) {
                count++;
            }
        } {
            if (("" + i).length() % 2 == 1) {
                count++;
            }
        } if (("" + i).length() % 2 == 1) {
                count++;
            } ("" + i).length() % 2 == 1 ("" + i).length() % 2 ("" + i).length() ("" + i).length ("" + i) "" i 2 1 {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

    public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);

        int n = sc.nextInt();

        int count = 0;

        for (int i = 1; i <= n; i++) {
            if (("" + i).length() % 2 == 1) {
                count++;
            }
        }

        System.out.println(count);

    }

} public class Main {

    public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);

        int n = sc.nextInt();

        int count = 0;

        for (int i = 1; i <= n; i++) {
            if (("" + i).length() % 2 == 1) {
                count++;
            }
        }

        System.out.println(count);

    }

} Main

public class Main {

    public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);

        int n = sc.nextInt();

        int count = 0;

        for (int i = 1; i <= n; i++) {
            if (("" + i).length() % 2 == 1) {
                count++;
            }
        }

        System.out.println(count);

    }

}
