import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.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 public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.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 scanner = new Scanner(System.in);
        int n = scanner.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 scanner = new Scanner(System.in);
        int n = scanner.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 scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner 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++ 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) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;

        for (int i = 1; i <= n; i++) {
            if(((int) Math.log10(i) + 1) % 2 == 1) {
                count++;
            }
        }
        System.out.println(count);
    }

} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.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
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;

        for (int i = 1; i <= n; i++) {
            if(((int) Math.log10(i) + 1) % 2 == 1) {
                count++;
            }
        }
        System.out.println(count);
    }

}

