import java.util.Scanner;

public class Main {

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 1; i <= N; i++) {
            if ((1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999)) {
                count++;
            }
        }
        System.out.print(count);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }
}
 import java.util.Scanner; Scanner java.util public class Main {

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 1; i <= N; i++) {
            if ((1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999)) {
                count++;
            }
        }
        System.out.print(count);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }
} Main void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 1; i <= N; i++) {
            if ((1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999)) {
                count++;
            }
        }
        System.out.print(count);
    } solve {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 1; i <= N; i++) {
            if ((1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999)) {
                count++;
            }
        }
        System.out.print(count);
    } Scanner sc = new Scanner(System.in); sc new 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 ((1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999)) {
                count++;
            }
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            if ((1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999)) {
                count++;
            }
        } {
            if ((1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999)) {
                count++;
            }
        } if ((1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999)) {
                count++;
            } (1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999) (1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999) (1 <= i && i <= 9) 1 <= i 1 i i <= 9 i 9 (100 <= i && i <= 999) 100 <= i 100 i i <= 999 i 999 (10000 <= i && i <= 99999) 10000 <= i 10000 i i <= 99999 i 99999 {
                count++;
            } count++ count System.out.print(count) System.out.print System.out System System.out count // Main
    public static void main(String[] args) {
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args public class Main {

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 1; i <= N; i++) {
            if ((1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999)) {
                count++;
            }
        }
        System.out.print(count);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }
} public class Main {

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 1; i <= N; i++) {
            if ((1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999)) {
                count++;
            }
        }
        System.out.print(count);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }
} Main
import java.util.Scanner;

public class Main {

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int count = 0;
        for (int i = 1; i <= N; i++) {
            if ((1 <= i && i <= 9) || (100 <= i && i <= 999) || (10000 <= i && i <= 99999)) {
                count++;
            }
        }
        System.out.print(count);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }
}

