import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int ans = 0;
    while (N != 0) {
      if (Integer.toString(N).length() % 2 != 0) ans++;
      N--;
    }
    System.out.println(ans);
  }
} 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 ans = 0;
    while (N != 0) {
      if (Integer.toString(N).length() % 2 != 0) ans++;
      N--;
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int ans = 0;
    while (N != 0) {
      if (Integer.toString(N).length() % 2 != 0) ans++;
      N--;
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int ans = 0;
    while (N != 0) {
      if (Integer.toString(N).length() % 2 != 0) ans++;
      N--;
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int ans = 0; ans 0 while (N != 0) {
      if (Integer.toString(N).length() % 2 != 0) ans++;
      N--;
    } N != 0 N 0 {
      if (Integer.toString(N).length() % 2 != 0) ans++;
      N--;
    } if (Integer.toString(N).length() % 2 != 0) ans++; Integer.toString(N).length() % 2 != 0 Integer.toString(N).length() % 2 Integer.toString(N).length() Integer.toString(N).length Integer.toString(N) Integer.toString Integer N 2 0 ans++ ans N-- N System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int ans = 0;
    while (N != 0) {
      if (Integer.toString(N).length() % 2 != 0) ans++;
      N--;
    }
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int ans = 0;
    while (N != 0) {
      if (Integer.toString(N).length() % 2 != 0) ans++;
      N--;
    }
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int ans = 0;
    while (N != 0) {
      if (Integer.toString(N).length() % 2 != 0) ans++;
      N--;
    }
    System.out.println(ans);
  }
}