import java.util.*;
public class Main {
	public static void main(String[]args) {
		Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
      	 	int a = 0;
      		int b = 0;
			for(int i=0; i<n;i++){
              a++;
              int lengthA = String.valueOf(a).length();
              if(lengthA%2!=0){
                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 n = sc.nextInt();
      	 	int a = 0;
      		int b = 0;
			for(int i=0; i<n;i++){
              a++;
              int lengthA = String.valueOf(a).length();
              if(lengthA%2!=0){
                b++;
              }
            }
			System.out.println(b);    
	}
} Main public static void main(String[]args) {
		Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
      	 	int a = 0;
      		int b = 0;
			for(int i=0; i<n;i++){
              a++;
              int lengthA = String.valueOf(a).length();
              if(lengthA%2!=0){
                b++;
              }
            }
			System.out.println(b);    
	} main {
		Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
      	 	int a = 0;
      		int b = 0;
			for(int i=0; i<n;i++){
              a++;
              int lengthA = String.valueOf(a).length();
              if(lengthA%2!=0){
                b++;
              }
            }
			System.out.println(b);    
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int a = 0; a 0 int b = 0; b 0 for(int i=0; i<n;i++){
              a++;
              int lengthA = String.valueOf(a).length();
              if(lengthA%2!=0){
                b++;
              }
            } int i=0; int i=0; i 0 i<n i n i++ i++ i {
              a++;
              int lengthA = String.valueOf(a).length();
              if(lengthA%2!=0){
                b++;
              }
            } {
              a++;
              int lengthA = String.valueOf(a).length();
              if(lengthA%2!=0){
                b++;
              }
            } a++ a int lengthA = String.valueOf(a).length(); lengthA String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a if(lengthA%2!=0){
                b++;
              } lengthA%2!=0 lengthA%2 lengthA 2 0 {
                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 n = sc.nextInt();
      	 	int a = 0;
      		int b = 0;
			for(int i=0; i<n;i++){
              a++;
              int lengthA = String.valueOf(a).length();
              if(lengthA%2!=0){
                b++;
              }
            }
			System.out.println(b);    
	}
} public class Main {
	public static void main(String[]args) {
		Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
      	 	int a = 0;
      		int b = 0;
			for(int i=0; i<n;i++){
              a++;
              int lengthA = String.valueOf(a).length();
              if(lengthA%2!=0){
                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 n = sc.nextInt();
      	 	int a = 0;
      		int b = 0;
			for(int i=0; i<n;i++){
              a++;
              int lengthA = String.valueOf(a).length();
              if(lengthA%2!=0){
                b++;
              }
            }
			System.out.println(b);    
	}
}