import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int nLen = String.valueOf(n).length();
        int result = 0;
        for (int i = 0; i < nLen / 2; i++) {
            result += 9 * (int)Math.pow(100, i);
        }
        if (nLen % 2 != 0) {
            int start = (int)Math.pow(10, nLen - 1);
            result += n - start + 1;
        }
        System.out.println(result);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int nLen = String.valueOf(n).length();
        int result = 0;
        for (int i = 0; i < nLen / 2; i++) {
            result += 9 * (int)Math.pow(100, i);
        }
        if (nLen % 2 != 0) {
            int start = (int)Math.pow(10, nLen - 1);
            result += n - start + 1;
        }
        System.out.println(result);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int nLen = String.valueOf(n).length();
        int result = 0;
        for (int i = 0; i < nLen / 2; i++) {
            result += 9 * (int)Math.pow(100, i);
        }
        if (nLen % 2 != 0) {
            int start = (int)Math.pow(10, nLen - 1);
            result += n - start + 1;
        }
        System.out.println(result);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int nLen = String.valueOf(n).length();
        int result = 0;
        for (int i = 0; i < nLen / 2; i++) {
            result += 9 * (int)Math.pow(100, i);
        }
        if (nLen % 2 != 0) {
            int start = (int)Math.pow(10, nLen - 1);
            result += n - start + 1;
        }
        System.out.println(result);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int nLen = String.valueOf(n).length(); nLen String.valueOf(n).length() String.valueOf(n).length String.valueOf(n) String.valueOf String n int result = 0; result 0 for (int i = 0; i < nLen / 2; i++) {
            result += 9 * (int)Math.pow(100, i);
        } int i = 0; int i = 0; i 0 i < nLen / 2 i nLen / 2 nLen 2 i++ i++ i {
            result += 9 * (int)Math.pow(100, i);
        } {
            result += 9 * (int)Math.pow(100, i);
        } result += 9 * (int)Math.pow(100, i) result 9 * (int)Math.pow(100, i) 9 (int)Math.pow(100, i) Math.pow Math 100 i if (nLen % 2 != 0) {
            int start = (int)Math.pow(10, nLen - 1);
            result += n - start + 1;
        } nLen % 2 != 0 nLen % 2 nLen 2 0 {
            int start = (int)Math.pow(10, nLen - 1);
            result += n - start + 1;
        } int start = (int)Math.pow(10, nLen - 1); start (int)Math.pow(10, nLen - 1) Math.pow Math 10 nLen - 1 nLen 1 result += n - start + 1 result n - start + 1 n - start n start 1 System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int nLen = String.valueOf(n).length();
        int result = 0;
        for (int i = 0; i < nLen / 2; i++) {
            result += 9 * (int)Math.pow(100, i);
        }
        if (nLen % 2 != 0) {
            int start = (int)Math.pow(10, nLen - 1);
            result += n - start + 1;
        }
        System.out.println(result);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int nLen = String.valueOf(n).length();
        int result = 0;
        for (int i = 0; i < nLen / 2; i++) {
            result += 9 * (int)Math.pow(100, i);
        }
        if (nLen % 2 != 0) {
            int start = (int)Math.pow(10, nLen - 1);
            result += n - start + 1;
        }
        System.out.println(result);
        sc.close();
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int nLen = String.valueOf(n).length();
        int result = 0;
        for (int i = 0; i < nLen / 2; i++) {
            result += 9 * (int)Math.pow(100, i);
        }
        if (nLen % 2 != 0) {
            int start = (int)Math.pow(10, nLen - 1);
            result += n - start + 1;
        }
        System.out.println(result);
        sc.close();
    }
}