import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n[] = new String[N] ;
		int count = 0;

		for(int i = 0; i < N; i++) {
			n[i] = String.valueOf(i+1);
		}
		
		for(int i = 0; i < N; i++) {
			if(n[i].length()==1) {
				count++;
			}
			if(n[i].length()==3) {
				count++;
			}
			if(n[i].length()==5) {
				count++;
			}
		}
		
		System.out.print(count);
	}
} 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();
		String n[] = new String[N] ;
		int count = 0;

		for(int i = 0; i < N; i++) {
			n[i] = String.valueOf(i+1);
		}
		
		for(int i = 0; i < N; i++) {
			if(n[i].length()==1) {
				count++;
			}
			if(n[i].length()==3) {
				count++;
			}
			if(n[i].length()==5) {
				count++;
			}
		}
		
		System.out.print(count);
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n[] = new String[N] ;
		int count = 0;

		for(int i = 0; i < N; i++) {
			n[i] = String.valueOf(i+1);
		}
		
		for(int i = 0; i < N; i++) {
			if(n[i].length()==1) {
				count++;
			}
			if(n[i].length()==3) {
				count++;
			}
			if(n[i].length()==5) {
				count++;
			}
		}
		
		System.out.print(count);
	} main {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n[] = new String[N] ;
		int count = 0;

		for(int i = 0; i < N; i++) {
			n[i] = String.valueOf(i+1);
		}
		
		for(int i = 0; i < N; i++) {
			if(n[i].length()==1) {
				count++;
			}
			if(n[i].length()==3) {
				count++;
			}
			if(n[i].length()==5) {
				count++;
			}
		}
		
		System.out.print(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String n[] = new String[N] ; n new String[N] N int count = 0; count 0 for(int i = 0; i < N; i++) {
			n[i] = String.valueOf(i+1);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			n[i] = String.valueOf(i+1);
		} {
			n[i] = String.valueOf(i+1);
		} n[i] = String.valueOf(i+1) n[i] n i String.valueOf(i+1) String.valueOf String i+1 i 1 for(int i = 0; i < N; i++) {
			if(n[i].length()==1) {
				count++;
			}
			if(n[i].length()==3) {
				count++;
			}
			if(n[i].length()==5) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if(n[i].length()==1) {
				count++;
			}
			if(n[i].length()==3) {
				count++;
			}
			if(n[i].length()==5) {
				count++;
			}
		} {
			if(n[i].length()==1) {
				count++;
			}
			if(n[i].length()==3) {
				count++;
			}
			if(n[i].length()==5) {
				count++;
			}
		} if(n[i].length()==1) {
				count++;
			} n[i].length()==1 n[i].length() n[i].length n[i] n i 1 {
				count++;
			} count++ count if(n[i].length()==3) {
				count++;
			} n[i].length()==3 n[i].length() n[i].length n[i] n i 3 {
				count++;
			} count++ count if(n[i].length()==5) {
				count++;
			} n[i].length()==5 n[i].length() n[i].length n[i] n i 5 {
				count++;
			} count++ count System.out.print(count) System.out.print System.out System System.out count String[] args args public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n[] = new String[N] ;
		int count = 0;

		for(int i = 0; i < N; i++) {
			n[i] = String.valueOf(i+1);
		}
		
		for(int i = 0; i < N; i++) {
			if(n[i].length()==1) {
				count++;
			}
			if(n[i].length()==3) {
				count++;
			}
			if(n[i].length()==5) {
				count++;
			}
		}
		
		System.out.print(count);
	}
} public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n[] = new String[N] ;
		int count = 0;

		for(int i = 0; i < N; i++) {
			n[i] = String.valueOf(i+1);
		}
		
		for(int i = 0; i < N; i++) {
			if(n[i].length()==1) {
				count++;
			}
			if(n[i].length()==3) {
				count++;
			}
			if(n[i].length()==5) {
				count++;
			}
		}
		
		System.out.print(count);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n[] = new String[N] ;
		int count = 0;

		for(int i = 0; i < N; i++) {
			n[i] = String.valueOf(i+1);
		}
		
		for(int i = 0; i < N; i++) {
			if(n[i].length()==1) {
				count++;
			}
			if(n[i].length()==3) {
				count++;
			}
			if(n[i].length()==5) {
				count++;
			}
		}
		
		System.out.print(count);
	}
}