import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        int cnt = 0;
        for (int i = N.length(); i > 0; i--) {
            if (i % 2 == 0) continue;
            if (i == N.length()) {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } else {
                cnt += 9 * Math.pow(10, i - 1);
            }
        }
        System.out.println(cnt);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        int cnt = 0;
        for (int i = N.length(); i > 0; i--) {
            if (i % 2 == 0) continue;
            if (i == N.length()) {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } else {
                cnt += 9 * Math.pow(10, i - 1);
            }
        }
        System.out.println(cnt);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        int cnt = 0;
        for (int i = N.length(); i > 0; i--) {
            if (i % 2 == 0) continue;
            if (i == N.length()) {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } else {
                cnt += 9 * Math.pow(10, i - 1);
            }
        }
        System.out.println(cnt);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        int cnt = 0;
        for (int i = N.length(); i > 0; i--) {
            if (i % 2 == 0) continue;
            if (i == N.length()) {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } else {
                cnt += 9 * Math.pow(10, i - 1);
            }
        }
        System.out.println(cnt);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String N = sc.next(); N sc.next() sc.next sc int cnt = 0; cnt 0 for (int i = N.length(); i > 0; i--) {
            if (i % 2 == 0) continue;
            if (i == N.length()) {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } else {
                cnt += 9 * Math.pow(10, i - 1);
            }
        } int i = N.length(); int i = N.length(); i N.length() N.length N i > 0 i 0 i-- i-- i {
            if (i % 2 == 0) continue;
            if (i == N.length()) {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } else {
                cnt += 9 * Math.pow(10, i - 1);
            }
        } {
            if (i % 2 == 0) continue;
            if (i == N.length()) {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } else {
                cnt += 9 * Math.pow(10, i - 1);
            }
        } if (i % 2 == 0) continue; i % 2 == 0 i % 2 i 2 0 continue; if (i == N.length()) {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } else {
                cnt += 9 * Math.pow(10, i - 1);
            } i == N.length() i N.length() N.length N {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1 cnt Integer.parseInt(N) - Math.pow(10, i - 1) + 1 Integer.parseInt(N) - Math.pow(10, i - 1) Integer.parseInt(N) Integer.parseInt Integer N Math.pow(10, i - 1) Math.pow Math 10 i - 1 i 1 1 {
                cnt += 9 * Math.pow(10, i - 1);
            } cnt += 9 * Math.pow(10, i - 1) cnt 9 * Math.pow(10, i - 1) 9 Math.pow(10, i - 1) Math.pow Math 10 i - 1 i 1 System.out.println(cnt) System.out.println System.out System System.out cnt sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        int cnt = 0;
        for (int i = N.length(); i > 0; i--) {
            if (i % 2 == 0) continue;
            if (i == N.length()) {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } else {
                cnt += 9 * Math.pow(10, i - 1);
            }
        }
        System.out.println(cnt);
        sc.close();
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        int cnt = 0;
        for (int i = N.length(); i > 0; i--) {
            if (i % 2 == 0) continue;
            if (i == N.length()) {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } else {
                cnt += 9 * Math.pow(10, i - 1);
            }
        }
        System.out.println(cnt);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String N = sc.next();
        int cnt = 0;
        for (int i = N.length(); i > 0; i--) {
            if (i % 2 == 0) continue;
            if (i == N.length()) {
                cnt += Integer.parseInt(N) - Math.pow(10, i - 1) + 1;
            } else {
                cnt += 9 * Math.pow(10, i - 1);
            }
        }
        System.out.println(cnt);
        sc.close();
    }
}