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

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		System.out.println(solve(n));
		in.close();
	}

	private static int solve(int n) {
		int r = 0;
		int l = 1;
		int h = 10;
		while (true) {
			if (n < l)
				return r;
			if (n < h)
				return r + n - l + 1;
			r += h - l;
			l *= 100;
			h *= 100;
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		System.out.println(solve(n));
		in.close();
	}

	private static int solve(int n) {
		int r = 0;
		int l = 1;
		int h = 10;
		while (true) {
			if (n < l)
				return r;
			if (n < h)
				return r + n - l + 1;
			r += h - l;
			l *= 100;
			h *= 100;
		}
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		System.out.println(solve(n));
		in.close();
	} main {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		System.out.println(solve(n));
		in.close();
	} Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); in new Scanner(new BufferedReader(new InputStreamReader(System.in))) int n = in.nextInt(); n in.nextInt() in.nextInt in System.out.println(solve(n)) System.out.println System.out System System.out solve(n) solve n in.close() in.close in String[] args args private static int solve(int n) {
		int r = 0;
		int l = 1;
		int h = 10;
		while (true) {
			if (n < l)
				return r;
			if (n < h)
				return r + n - l + 1;
			r += h - l;
			l *= 100;
			h *= 100;
		}
	} solve {
		int r = 0;
		int l = 1;
		int h = 10;
		while (true) {
			if (n < l)
				return r;
			if (n < h)
				return r + n - l + 1;
			r += h - l;
			l *= 100;
			h *= 100;
		}
	} int r = 0; r 0 int l = 1; l 1 int h = 10; h 10 while (true) {
			if (n < l)
				return r;
			if (n < h)
				return r + n - l + 1;
			r += h - l;
			l *= 100;
			h *= 100;
		} true {
			if (n < l)
				return r;
			if (n < h)
				return r + n - l + 1;
			r += h - l;
			l *= 100;
			h *= 100;
		} if (n < l)
				return r; n < l n l return r; r if (n < h)
				return r + n - l + 1; n < h n h return r + n - l + 1; r + n - l + 1 r + n - l r + n r n l 1 r += h - l r h - l h l l *= 100 l 100 h *= 100 h 100 int n n public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		System.out.println(solve(n));
		in.close();
	}

	private static int solve(int n) {
		int r = 0;
		int l = 1;
		int h = 10;
		while (true) {
			if (n < l)
				return r;
			if (n < h)
				return r + n - l + 1;
			r += h - l;
			l *= 100;
			h *= 100;
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		System.out.println(solve(n));
		in.close();
	}

	private static int solve(int n) {
		int r = 0;
		int l = 1;
		int h = 10;
		while (true) {
			if (n < l)
				return r;
			if (n < h)
				return r + n - l + 1;
			r += h - l;
			l *= 100;
			h *= 100;
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		System.out.println(solve(n));
		in.close();
	}

	private static int solve(int n) {
		int r = 0;
		int l = 1;
		int h = 10;
		while (true) {
			if (n < l)
				return r;
			if (n < h)
				return r + n - l + 1;
			r += h - l;
			l *= 100;
			h *= 100;
		}
	}
}