import java.util.Scanner;

public class Main {
  private static boolean isOddNumDigits (int n) {
    int count = 0;
    while (n > 0) {
      n /= 10;
      count++;
    }
    return count % 2 == 1;
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    sc.close();
    int count = 0;
    for (int i = 1; i <= n; i++) {
      count += isOddNumDigits(i) ? 1 : 0;
    }
    System.out.println(count);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  private static boolean isOddNumDigits (int n) {
    int count = 0;
    while (n > 0) {
      n /= 10;
      count++;
    }
    return count % 2 == 1;
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    sc.close();
    int count = 0;
    for (int i = 1; i <= n; i++) {
      count += isOddNumDigits(i) ? 1 : 0;
    }
    System.out.println(count);
  }
} Main private static boolean isOddNumDigits (int n) {
    int count = 0;
    while (n > 0) {
      n /= 10;
      count++;
    }
    return count % 2 == 1;
  } isOddNumDigits {
    int count = 0;
    while (n > 0) {
      n /= 10;
      count++;
    }
    return count % 2 == 1;
  } int count = 0; count 0 while (n > 0) {
      n /= 10;
      count++;
    } n > 0 n 0 {
      n /= 10;
      count++;
    } n /= 10 n 10 count++ count return count % 2 == 1; count % 2 == 1 count % 2 count 2 1 int n n public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    sc.close();
    int count = 0;
    for (int i = 1; i <= n; i++) {
      count += isOddNumDigits(i) ? 1 : 0;
    }
    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    sc.close();
    int count = 0;
    for (int i = 1; i <= n; i++) {
      count += isOddNumDigits(i) ? 1 : 0;
    }
    System.out.println(count);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc sc.close() sc.close sc int count = 0; count 0 for (int i = 1; i <= n; i++) {
      count += isOddNumDigits(i) ? 1 : 0;
    } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
      count += isOddNumDigits(i) ? 1 : 0;
    } {
      count += isOddNumDigits(i) ? 1 : 0;
    } count += isOddNumDigits(i) ? 1 : 0 count isOddNumDigits(i) ? 1 : 0 isOddNumDigits(i) isOddNumDigits i 1 0 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
  private static boolean isOddNumDigits (int n) {
    int count = 0;
    while (n > 0) {
      n /= 10;
      count++;
    }
    return count % 2 == 1;
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    sc.close();
    int count = 0;
    for (int i = 1; i <= n; i++) {
      count += isOddNumDigits(i) ? 1 : 0;
    }
    System.out.println(count);
  }
} public class Main {
  private static boolean isOddNumDigits (int n) {
    int count = 0;
    while (n > 0) {
      n /= 10;
      count++;
    }
    return count % 2 == 1;
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    sc.close();
    int count = 0;
    for (int i = 1; i <= n; i++) {
      count += isOddNumDigits(i) ? 1 : 0;
    }
    System.out.println(count);
  }
} Main
import java.util.Scanner;

public class Main {
  private static boolean isOddNumDigits (int n) {
    int count = 0;
    while (n > 0) {
      n /= 10;
      count++;
    }
    return count % 2 == 1;
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    sc.close();
    int count = 0;
    for (int i = 1; i <= n; i++) {
      count += isOddNumDigits(i) ? 1 : 0;
    }
    System.out.println(count);
  }
}