import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        int all = 0;
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 1; i <= n; i++) {
            String str = i + "";
            if (str.length() % 2 == 1) {
                all++;
            }
        }
        System.out.println(all + "");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        int all = 0;
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 1; i <= n; i++) {
            String str = i + "";
            if (str.length() % 2 == 1) {
                all++;
            }
        }
        System.out.println(all + "");
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        int all = 0;
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 1; i <= n; i++) {
            String str = i + "";
            if (str.length() % 2 == 1) {
                all++;
            }
        }
        System.out.println(all + "");
    } main {
        // Your code here!
        int all = 0;
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 1; i <= n; i++) {
            String str = i + "";
            if (str.length() % 2 == 1) {
                all++;
            }
        }
        System.out.println(all + "");
    } int all = 0; all 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int i = 1; i <= n; i++) {
            String str = i + "";
            if (str.length() % 2 == 1) {
                all++;
            }
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            String str = i + "";
            if (str.length() % 2 == 1) {
                all++;
            }
        } {
            String str = i + "";
            if (str.length() % 2 == 1) {
                all++;
            }
        } String str = i + ""; str i + "" i "" if (str.length() % 2 == 1) {
                all++;
            } str.length() % 2 == 1 str.length() % 2 str.length() str.length str 2 1 {
                all++;
            } all++ all System.out.println(all + "") System.out.println System.out System System.out all + "" all "" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        int all = 0;
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 1; i <= n; i++) {
            String str = i + "";
            if (str.length() % 2 == 1) {
                all++;
            }
        }
        System.out.println(all + "");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        int all = 0;
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 1; i <= n; i++) {
            String str = i + "";
            if (str.length() % 2 == 1) {
                all++;
            }
        }
        System.out.println(all + "");
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        int all = 0;
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 1; i <= n; i++) {
            String str = i + "";
            if (str.length() % 2 == 1) {
                all++;
            }
        }
        System.out.println(all + "");
    }
}