import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
    public static final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
    public static final PrintStream out = System.out;

    public static void main(String[] args) {
        int N = in.nextInt();

        int L = 1, R = 10;
        int result = 0;
        for (; R <= N; L *= 100, R *= 100) {
            result += R - L;
        }

        result += N - Math.min(L - 1, N);

        out.println(result);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {
    public static final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
    public static final PrintStream out = System.out;

    public static void main(String[] args) {
        int N = in.nextInt();

        int L = 1, R = 10;
        int result = 0;
        for (; R <= N; L *= 100, R *= 100) {
            result += R - L;
        }

        result += N - Math.min(L - 1, N);

        out.println(result);
    }
} Main public static final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); in new Scanner(new BufferedReader(new InputStreamReader(System.in))) public static final PrintStream out = System.out; out System.out System System.out public static void main(String[] args) {
        int N = in.nextInt();

        int L = 1, R = 10;
        int result = 0;
        for (; R <= N; L *= 100, R *= 100) {
            result += R - L;
        }

        result += N - Math.min(L - 1, N);

        out.println(result);
    } main {
        int N = in.nextInt();

        int L = 1, R = 10;
        int result = 0;
        for (; R <= N; L *= 100, R *= 100) {
            result += R - L;
        }

        result += N - Math.min(L - 1, N);

        out.println(result);
    } int N = in.nextInt(); N in.nextInt() in.nextInt in int L = 1 L 1 R = 10; R 10 int result = 0; result 0 for (; R <= N; L *= 100, R *= 100) {
            result += R - L;
        } ; R <= N R N L *= 100, R *= 100 L *= 100 L 100 R *= 100 R 100 {
            result += R - L;
        } {
            result += R - L;
        } result += R - L result R - L R L result += N - Math.min(L - 1, N) result N - Math.min(L - 1, N) N Math.min(L - 1, N) Math.min Math L - 1 L 1 N out.println(result) out.println out result String[] args args public class Main {
    public static final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
    public static final PrintStream out = System.out;

    public static void main(String[] args) {
        int N = in.nextInt();

        int L = 1, R = 10;
        int result = 0;
        for (; R <= N; L *= 100, R *= 100) {
            result += R - L;
        }

        result += N - Math.min(L - 1, N);

        out.println(result);
    }
} public class Main {
    public static final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
    public static final PrintStream out = System.out;

    public static void main(String[] args) {
        int N = in.nextInt();

        int L = 1, R = 10;
        int result = 0;
        for (; R <= N; L *= 100, R *= 100) {
            result += R - L;
        }

        result += N - Math.min(L - 1, N);

        out.println(result);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
    public static final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
    public static final PrintStream out = System.out;

    public static void main(String[] args) {
        int N = in.nextInt();

        int L = 1, R = 10;
        int result = 0;
        for (; R <= N; L *= 100, R *= 100) {
            result += R - L;
        }

        result += N - Math.min(L - 1, N);

        out.println(result);
    }
}
