import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int count = 0;
		int ans = 0;
		int num = 0;
		for(int i = 1; i <= a; i++) {
			num = i;
			while(num != 0) {
				num = num / 10;
				count++;
			}
			if(!(count % 2 == 0)){
				ans++;
			}
			count = 0;
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int count = 0;
		int ans = 0;
		int num = 0;
		for(int i = 1; i <= a; i++) {
			num = i;
			while(num != 0) {
				num = num / 10;
				count++;
			}
			if(!(count % 2 == 0)){
				ans++;
			}
			count = 0;
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int count = 0;
		int ans = 0;
		int num = 0;
		for(int i = 1; i <= a; i++) {
			num = i;
			while(num != 0) {
				num = num / 10;
				count++;
			}
			if(!(count % 2 == 0)){
				ans++;
			}
			count = 0;
		}
		System.out.println(ans);
	} main {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int count = 0;
		int ans = 0;
		int num = 0;
		for(int i = 1; i <= a; i++) {
			num = i;
			while(num != 0) {
				num = num / 10;
				count++;
			}
			if(!(count % 2 == 0)){
				ans++;
			}
			count = 0;
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int count = 0; count 0 int ans = 0; ans 0 int num = 0; num 0 for(int i = 1; i <= a; i++) {
			num = i;
			while(num != 0) {
				num = num / 10;
				count++;
			}
			if(!(count % 2 == 0)){
				ans++;
			}
			count = 0;
		} int i = 1; int i = 1; i 1 i <= a i a i++ i++ i {
			num = i;
			while(num != 0) {
				num = num / 10;
				count++;
			}
			if(!(count % 2 == 0)){
				ans++;
			}
			count = 0;
		} {
			num = i;
			while(num != 0) {
				num = num / 10;
				count++;
			}
			if(!(count % 2 == 0)){
				ans++;
			}
			count = 0;
		} num = i num i while(num != 0) {
				num = num / 10;
				count++;
			} num != 0 num 0 {
				num = num / 10;
				count++;
			} num = num / 10 num num / 10 num 10 count++ count if(!(count % 2 == 0)){
				ans++;
			} !(count % 2 == 0) (count % 2 == 0) count % 2 count 2 0 {
				ans++;
			} ans++ ans count = 0 count 0 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 sc = new Scanner(System.in);
		int a = sc.nextInt();
		int count = 0;
		int ans = 0;
		int num = 0;
		for(int i = 1; i <= a; i++) {
			num = i;
			while(num != 0) {
				num = num / 10;
				count++;
			}
			if(!(count % 2 == 0)){
				ans++;
			}
			count = 0;
		}
		System.out.println(ans);
	}
} public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int count = 0;
		int ans = 0;
		int num = 0;
		for(int i = 1; i <= a; i++) {
			num = i;
			while(num != 0) {
				num = num / 10;
				count++;
			}
			if(!(count % 2 == 0)){
				ans++;
			}
			count = 0;
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int count = 0;
		int ans = 0;
		int num = 0;
		for(int i = 1; i <= a; i++) {
			num = i;
			while(num != 0) {
				num = num / 10;
				count++;
			}
			if(!(count % 2 == 0)){
				ans++;
			}
			count = 0;
		}
		System.out.println(ans);
	}
}