import java.util.Scanner;

public class Main { 

	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int line = Integer.parseInt(sc.nextLine());
    	int result = 0;
    	for(int i = 1;i<=line;i++) {
    		int numberLength = String.valueOf(i).length();
    		if(numberLength%2 == 1) {
    			result++;
    		}
    	}
    	System.out.println(result);
    	
	}
} import java.util.Scanner; Scanner java.util public class Main { 

	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int line = Integer.parseInt(sc.nextLine());
    	int result = 0;
    	for(int i = 1;i<=line;i++) {
    		int numberLength = String.valueOf(i).length();
    		if(numberLength%2 == 1) {
    			result++;
    		}
    	}
    	System.out.println(result);
    	
	}
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int line = Integer.parseInt(sc.nextLine());
    	int result = 0;
    	for(int i = 1;i<=line;i++) {
    		int numberLength = String.valueOf(i).length();
    		if(numberLength%2 == 1) {
    			result++;
    		}
    	}
    	System.out.println(result);
    	
	} main {
    	Scanner sc = new Scanner(System.in);
    	int line = Integer.parseInt(sc.nextLine());
    	int result = 0;
    	for(int i = 1;i<=line;i++) {
    		int numberLength = String.valueOf(i).length();
    		if(numberLength%2 == 1) {
    			result++;
    		}
    	}
    	System.out.println(result);
    	
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int line = Integer.parseInt(sc.nextLine()); line Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int result = 0; result 0 for(int i = 1;i<=line;i++) {
    		int numberLength = String.valueOf(i).length();
    		if(numberLength%2 == 1) {
    			result++;
    		}
    	} int i = 1; int i = 1; i 1 i<=line i line i++ i++ i {
    		int numberLength = String.valueOf(i).length();
    		if(numberLength%2 == 1) {
    			result++;
    		}
    	} {
    		int numberLength = String.valueOf(i).length();
    		if(numberLength%2 == 1) {
    			result++;
    		}
    	} int numberLength = String.valueOf(i).length(); numberLength String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i if(numberLength%2 == 1) {
    			result++;
    		} numberLength%2 == 1 numberLength%2 numberLength 2 1 {
    			result++;
    		} result++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main { 

	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int line = Integer.parseInt(sc.nextLine());
    	int result = 0;
    	for(int i = 1;i<=line;i++) {
    		int numberLength = String.valueOf(i).length();
    		if(numberLength%2 == 1) {
    			result++;
    		}
    	}
    	System.out.println(result);
    	
	}
} public class Main { 

	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int line = Integer.parseInt(sc.nextLine());
    	int result = 0;
    	for(int i = 1;i<=line;i++) {
    		int numberLength = String.valueOf(i).length();
    		if(numberLength%2 == 1) {
    			result++;
    		}
    	}
    	System.out.println(result);
    	
	}
} Main
import java.util.Scanner;

public class Main { 

	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int line = Integer.parseInt(sc.nextLine());
    	int result = 0;
    	for(int i = 1;i<=line;i++) {
    		int numberLength = String.valueOf(i).length();
    		if(numberLength%2 == 1) {
    			result++;
    		}
    	}
    	System.out.println(result);
    	
	}
}