import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		int ans = 0;
		int i;
		int length;
		for(i = 1; i <= n; i++) {
			length = String.valueOf(i).length();
			if(!(length % 2 == 0))
				ans++;
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		int ans = 0;
		int i;
		int length;
		for(i = 1; i <= n; i++) {
			length = String.valueOf(i).length();
			if(!(length % 2 == 0))
				ans++;
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		int ans = 0;
		int i;
		int length;
		for(i = 1; i <= n; i++) {
			length = String.valueOf(i).length();
			if(!(length % 2 == 0))
				ans++;
		}
		System.out.println(ans);
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		int ans = 0;
		int i;
		int length;
		for(i = 1; i <= n; i++) {
			length = String.valueOf(i).length();
			if(!(length % 2 == 0))
				ans++;
		}
		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int ans = 0; ans 0 int i; i int length; length for(i = 1; i <= n; i++) {
			length = String.valueOf(i).length();
			if(!(length % 2 == 0))
				ans++;
		} i = 1; i = 1 i 1 i <= n i n i++ i++ i {
			length = String.valueOf(i).length();
			if(!(length % 2 == 0))
				ans++;
		} {
			length = String.valueOf(i).length();
			if(!(length % 2 == 0))
				ans++;
		} length = String.valueOf(i).length() length String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i if(!(length % 2 == 0))
				ans++; !(length % 2 == 0) (length % 2 == 0) length % 2 length 2 0 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		int ans = 0;
		int i;
		int length;
		for(i = 1; i <= n; i++) {
			length = String.valueOf(i).length();
			if(!(length % 2 == 0))
				ans++;
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		int ans = 0;
		int i;
		int length;
		for(i = 1; i <= n; i++) {
			length = String.valueOf(i).length();
			if(!(length % 2 == 0))
				ans++;
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		int ans = 0;
		int i;
		int length;
		for(i = 1; i <= n; i++) {
			length = String.valueOf(i).length();
			if(!(length % 2 == 0))
				ans++;
		}
		System.out.println(ans);
	}
}
