import java.util.*;

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

public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int Number = sc.nextInt();
    int count=0;
    int valLen =0;
    for(int i=1; i<=Number;i++){
      valLen= String.valueOf( i ).length();
    	if(valLen%2==1){
        count++;
        }
    }System.out.println(count);
  }
}

