import java.util.Scanner; 
import java.lang.Math;

public class Main { 
     public static void main(String[] args) { 
         Scanner sc = new Scanner(System.in);
         int n = Integer.parseInt(sc.next());

         System.out.println(solve(n));
     } 
    public static int solve(int n) {
        int ans = 0;
        for (int i = 1; i <= n; i++) {
             int digit = (int) Math.log10(i) + 1;
             if (digit %2==1) {
                ans++;
             } 
         } 
         return ans;
     } 
}  import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang public class Main { 
     public static void main(String[] args) { 
         Scanner sc = new Scanner(System.in);
         int n = Integer.parseInt(sc.next());

         System.out.println(solve(n));
     } 
    public static int solve(int n) {
        int ans = 0;
        for (int i = 1; i <= n; i++) {
             int digit = (int) Math.log10(i) + 1;
             if (digit %2==1) {
                ans++;
             } 
         } 
         return ans;
     } 
} Main public static void main(String[] args) { 
         Scanner sc = new Scanner(System.in);
         int n = Integer.parseInt(sc.next());

         System.out.println(solve(n));
     } main { 
         Scanner sc = new Scanner(System.in);
         int n = Integer.parseInt(sc.next());

         System.out.println(solve(n));
     } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc System.out.println(solve(n)) System.out.println System.out System System.out solve(n) solve n String[] args args public static int solve(int n) {
        int ans = 0;
        for (int i = 1; i <= n; i++) {
             int digit = (int) Math.log10(i) + 1;
             if (digit %2==1) {
                ans++;
             } 
         } 
         return ans;
     } solve {
        int ans = 0;
        for (int i = 1; i <= n; i++) {
             int digit = (int) Math.log10(i) + 1;
             if (digit %2==1) {
                ans++;
             } 
         } 
         return ans;
     } int ans = 0; ans 0 for (int i = 1; i <= n; i++) {
             int digit = (int) Math.log10(i) + 1;
             if (digit %2==1) {
                ans++;
             } 
         } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
             int digit = (int) Math.log10(i) + 1;
             if (digit %2==1) {
                ans++;
             } 
         } {
             int digit = (int) Math.log10(i) + 1;
             if (digit %2==1) {
                ans++;
             } 
         } int digit = (int) Math.log10(i) + 1; digit (int) Math.log10(i) + 1 (int) Math.log10(i) Math.log10 Math i 1 if (digit %2==1) {
                ans++;
             } digit %2==1 digit %2 digit 2 1 {
                ans++;
             } ans++ ans return ans; ans int n n public class Main { 
     public static void main(String[] args) { 
         Scanner sc = new Scanner(System.in);
         int n = Integer.parseInt(sc.next());

         System.out.println(solve(n));
     } 
    public static int solve(int n) {
        int ans = 0;
        for (int i = 1; i <= n; i++) {
             int digit = (int) Math.log10(i) + 1;
             if (digit %2==1) {
                ans++;
             } 
         } 
         return ans;
     } 
} public class Main { 
     public static void main(String[] args) { 
         Scanner sc = new Scanner(System.in);
         int n = Integer.parseInt(sc.next());

         System.out.println(solve(n));
     } 
    public static int solve(int n) {
        int ans = 0;
        for (int i = 1; i <= n; i++) {
             int digit = (int) Math.log10(i) + 1;
             if (digit %2==1) {
                ans++;
             } 
         } 
         return ans;
     } 
} Main
import java.util.Scanner; 
import java.lang.Math;

public class Main { 
     public static void main(String[] args) { 
         Scanner sc = new Scanner(System.in);
         int n = Integer.parseInt(sc.next());

         System.out.println(solve(n));
     } 
    public static int solve(int n) {
        int ans = 0;
        for (int i = 1; i <= n; i++) {
             int digit = (int) Math.log10(i) + 1;
             if (digit %2==1) {
                ans++;
             } 
         } 
         return ans;
     } 
} 