import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = 0;
        for(int i=1;i<=a;i++){String s = String.valueOf(i); 
                              if(s.length()%2==1){b++;
                                                 }
                             }
		System.out.println(b);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = 0;
        for(int i=1;i<=a;i++){String s = String.valueOf(i); 
                              if(s.length()%2==1){b++;
                                                 }
                             }
		System.out.println(b);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = 0;
        for(int i=1;i<=a;i++){String s = String.valueOf(i); 
                              if(s.length()%2==1){b++;
                                                 }
                             }
		System.out.println(b);
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = 0;
        for(int i=1;i<=a;i++){String s = String.valueOf(i); 
                              if(s.length()%2==1){b++;
                                                 }
                             }
		System.out.println(b);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = 0; b 0 for(int i=1;i<=a;i++){String s = String.valueOf(i); 
                              if(s.length()%2==1){b++;
                                                 }
                             } int i=1; int i=1; i 1 i<=a i a i++ i++ i {String s = String.valueOf(i); 
                              if(s.length()%2==1){b++;
                                                 }
                             } {String s = String.valueOf(i); 
                              if(s.length()%2==1){b++;
                                                 }
                             } String s = String.valueOf(i); s String.valueOf(i) String.valueOf String i if(s.length()%2==1){b++;
                                                 } s.length()%2==1 s.length()%2 s.length() s.length s 2 1 {b++;
                                                 } b++ b System.out.println(b) System.out.println System.out System System.out b String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = 0;
        for(int i=1;i<=a;i++){String s = String.valueOf(i); 
                              if(s.length()%2==1){b++;
                                                 }
                             }
		System.out.println(b);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = 0;
        for(int i=1;i<=a;i++){String s = String.valueOf(i); 
                              if(s.length()%2==1){b++;
                                                 }
                             }
		System.out.println(b);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = 0;
        for(int i=1;i<=a;i++){String s = String.valueOf(i); 
                              if(s.length()%2==1){b++;
                                                 }
                             }
		System.out.println(b);
	}
}
