import java.util.*;

public class Main { 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int len = String.valueOf(n).length();
        int count = 0;
        for (int i=1; i<=len; i++) {
            if (i % 2 == 1 && i == len) {
                count += n - Math.pow(10, i-1) + 1;
            } else if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            }
        }
        System.out.print(count);
    }
} 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 len = String.valueOf(n).length();
        int count = 0;
        for (int i=1; i<=len; i++) {
            if (i % 2 == 1 && i == len) {
                count += n - Math.pow(10, i-1) + 1;
            } else if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            }
        }
        System.out.print(count);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int len = String.valueOf(n).length();
        int count = 0;
        for (int i=1; i<=len; i++) {
            if (i % 2 == 1 && i == len) {
                count += n - Math.pow(10, i-1) + 1;
            } else if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            }
        }
        System.out.print(count);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int len = String.valueOf(n).length();
        int count = 0;
        for (int i=1; i<=len; i++) {
            if (i % 2 == 1 && i == len) {
                count += n - Math.pow(10, i-1) + 1;
            } else if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            }
        }
        System.out.print(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int len = String.valueOf(n).length(); len String.valueOf(n).length() String.valueOf(n).length String.valueOf(n) String.valueOf String n int count = 0; count 0 for (int i=1; i<=len; i++) {
            if (i % 2 == 1 && i == len) {
                count += n - Math.pow(10, i-1) + 1;
            } else if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            }
        } int i=1; int i=1; i 1 i<=len i len i++ i++ i {
            if (i % 2 == 1 && i == len) {
                count += n - Math.pow(10, i-1) + 1;
            } else if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            }
        } {
            if (i % 2 == 1 && i == len) {
                count += n - Math.pow(10, i-1) + 1;
            } else if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            }
        } if (i % 2 == 1 && i == len) {
                count += n - Math.pow(10, i-1) + 1;
            } else if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            } i % 2 == 1 && i == len i % 2 == 1 i % 2 i 2 1 i == len i len {
                count += n - Math.pow(10, i-1) + 1;
            } count += n - Math.pow(10, i-1) + 1 count n - Math.pow(10, i-1) + 1 n - Math.pow(10, i-1) n Math.pow(10, i-1) Math.pow Math 10 i-1 i 1 1 if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            } i % 2 == 1 i % 2 i 2 1 {
                count += 9 * Math.pow(10, i-1);
            } count += 9 * Math.pow(10, i-1) count 9 * Math.pow(10, i-1) 9 Math.pow(10, i-1) Math.pow Math 10 i-1 i 1 System.out.print(count) System.out.print System.out System System.out count String[] args args public class Main { 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int len = String.valueOf(n).length();
        int count = 0;
        for (int i=1; i<=len; i++) {
            if (i % 2 == 1 && i == len) {
                count += n - Math.pow(10, i-1) + 1;
            } else if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            }
        }
        System.out.print(count);
    }
} public class Main { 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int len = String.valueOf(n).length();
        int count = 0;
        for (int i=1; i<=len; i++) {
            if (i % 2 == 1 && i == len) {
                count += n - Math.pow(10, i-1) + 1;
            } else if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            }
        }
        System.out.print(count);
    }
} Main
import java.util.*;

public class Main { 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int len = String.valueOf(n).length();
        int count = 0;
        for (int i=1; i<=len; i++) {
            if (i % 2 == 1 && i == len) {
                count += n - Math.pow(10, i-1) + 1;
            } else if (i % 2 == 1) {
                count += 9 * Math.pow(10, i-1);
            }
        }
        System.out.print(count);
    }
}