
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> answerList = new ArrayList();
		
		for(int i = 1; i <= n; i++) {
			int number = i;
			int count = 0;
			while(number >= 10) {
				number /= 10;
				count ++;
			}
			if(count == 0 || count % 2 == 0) {
				answerList.add(i);
			}
		}
		System.out.println(answerList.size());
		
		


		

		
		

		
		
	}	

}
 import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> answerList = new ArrayList();
		
		for(int i = 1; i <= n; i++) {
			int number = i;
			int count = 0;
			while(number >= 10) {
				number /= 10;
				count ++;
			}
			if(count == 0 || count % 2 == 0) {
				answerList.add(i);
			}
		}
		System.out.println(answerList.size());
		
		


		

		
		

		
		
	}	

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> answerList = new ArrayList();
		
		for(int i = 1; i <= n; i++) {
			int number = i;
			int count = 0;
			while(number >= 10) {
				number /= 10;
				count ++;
			}
			if(count == 0 || count % 2 == 0) {
				answerList.add(i);
			}
		}
		System.out.println(answerList.size());
		
		


		

		
		

		
		
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> answerList = new ArrayList();
		
		for(int i = 1; i <= n; i++) {
			int number = i;
			int count = 0;
			while(number >= 10) {
				number /= 10;
				count ++;
			}
			if(count == 0 || count % 2 == 0) {
				answerList.add(i);
			}
		}
		System.out.println(answerList.size());
		
		


		

		
		

		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<Integer> answerList = new ArrayList(); answerList new ArrayList() for(int i = 1; i <= n; i++) {
			int number = i;
			int count = 0;
			while(number >= 10) {
				number /= 10;
				count ++;
			}
			if(count == 0 || count % 2 == 0) {
				answerList.add(i);
			}
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			int number = i;
			int count = 0;
			while(number >= 10) {
				number /= 10;
				count ++;
			}
			if(count == 0 || count % 2 == 0) {
				answerList.add(i);
			}
		} {
			int number = i;
			int count = 0;
			while(number >= 10) {
				number /= 10;
				count ++;
			}
			if(count == 0 || count % 2 == 0) {
				answerList.add(i);
			}
		} int number = i; number i int count = 0; count 0 while(number >= 10) {
				number /= 10;
				count ++;
			} number >= 10 number 10 {
				number /= 10;
				count ++;
			} number /= 10 number 10 count ++ count if(count == 0 || count % 2 == 0) {
				answerList.add(i);
			} count == 0 || count % 2 == 0 count == 0 count 0 count % 2 == 0 count % 2 count 2 0 {
				answerList.add(i);
			} answerList.add(i) answerList.add answerList i System.out.println(answerList.size()) System.out.println System.out System System.out answerList.size() answerList.size answerList String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> answerList = new ArrayList();
		
		for(int i = 1; i <= n; i++) {
			int number = i;
			int count = 0;
			while(number >= 10) {
				number /= 10;
				count ++;
			}
			if(count == 0 || count % 2 == 0) {
				answerList.add(i);
			}
		}
		System.out.println(answerList.size());
		
		


		

		
		

		
		
	}	

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> answerList = new ArrayList();
		
		for(int i = 1; i <= n; i++) {
			int number = i;
			int count = 0;
			while(number >= 10) {
				number /= 10;
				count ++;
			}
			if(count == 0 || count % 2 == 0) {
				answerList.add(i);
			}
		}
		System.out.println(answerList.size());
		
		


		

		
		

		
		
	}	

} Main

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> answerList = new ArrayList();
		
		for(int i = 1; i <= n; i++) {
			int number = i;
			int count = 0;
			while(number >= 10) {
				number /= 10;
				count ++;
			}
			if(count == 0 || count % 2 == 0) {
				answerList.add(i);
			}
		}
		System.out.println(answerList.size());
		
		


		

		
		

		
		
	}	

}

