import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;

    for(int i = 1; i <= n; i++) {
      String s = String.valueOf(i);
      int s_length = s.length();
      if(s_length%2!=0) {
        cnt +=1;
      }
    }
    
    System.out.println(cnt);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;

    for(int i = 1; i <= n; i++) {
      String s = String.valueOf(i);
      int s_length = s.length();
      if(s_length%2!=0) {
        cnt +=1;
      }
    }
    
    System.out.println(cnt);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;

    for(int i = 1; i <= n; i++) {
      String s = String.valueOf(i);
      int s_length = s.length();
      if(s_length%2!=0) {
        cnt +=1;
      }
    }
    
    System.out.println(cnt);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;

    for(int i = 1; i <= n; i++) {
      String s = String.valueOf(i);
      int s_length = s.length();
      if(s_length%2!=0) {
        cnt +=1;
      }
    }
    
    System.out.println(cnt);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(in.readLine()); n Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in int cnt = 0; cnt 0 for(int i = 1; i <= n; i++) {
      String s = String.valueOf(i);
      int s_length = s.length();
      if(s_length%2!=0) {
        cnt +=1;
      }
    } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
      String s = String.valueOf(i);
      int s_length = s.length();
      if(s_length%2!=0) {
        cnt +=1;
      }
    } {
      String s = String.valueOf(i);
      int s_length = s.length();
      if(s_length%2!=0) {
        cnt +=1;
      }
    } String s = String.valueOf(i); s String.valueOf(i) String.valueOf String i int s_length = s.length(); s_length s.length() s.length s if(s_length%2!=0) {
        cnt +=1;
      } s_length%2!=0 s_length%2 s_length 2 0 {
        cnt +=1;
      } cnt +=1 cnt 1 System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;

    for(int i = 1; i <= n; i++) {
      String s = String.valueOf(i);
      int s_length = s.length();
      if(s_length%2!=0) {
        cnt +=1;
      }
    }
    
    System.out.println(cnt);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;

    for(int i = 1; i <= n; i++) {
      String s = String.valueOf(i);
      int s_length = s.length();
      if(s_length%2!=0) {
        cnt +=1;
      }
    }
    
    System.out.println(cnt);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int cnt = 0;

    for(int i = 1; i <= n; i++) {
      String s = String.valueOf(i);
      int s_length = s.length();
      if(s_length%2!=0) {
        cnt +=1;
      }
    }
    
    System.out.println(cnt);
  }
}