import java.util.*;

public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;
 
	void doIt() {
		int n = sc.nextInt();
		if(n >= 1000 && n <= 9999) {
			n = 909;
		}
		else if(n >= 10 && n <= 99) {
			n = 9;
		}
		else {
			if(n >= 100000) {
				n -= 9091;
			}
			else if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			}
			
		}
		System.out.println(n);
	}
 
	public static void main(String[] args) {
		new Main().doIt();
	}
} import java.util.*; util.* java public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;
 
	void doIt() {
		int n = sc.nextInt();
		if(n >= 1000 && n <= 9999) {
			n = 909;
		}
		else if(n >= 10 && n <= 99) {
			n = 9;
		}
		else {
			if(n >= 100000) {
				n -= 9091;
			}
			else if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			}
			
		}
		System.out.println(n);
	}
 
	public static void main(String[] args) {
		new Main().doIt();
	}
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int MOD = 1000000007; MOD 1000000007 final int MAX = Integer.MAX_VALUE; MAX Integer.MAX_VALUE Integer Integer.MAX_VALUE final long LMAX = Long.MAX_VALUE; LMAX Long.MAX_VALUE Long Long.MAX_VALUE void doIt() {
		int n = sc.nextInt();
		if(n >= 1000 && n <= 9999) {
			n = 909;
		}
		else if(n >= 10 && n <= 99) {
			n = 9;
		}
		else {
			if(n >= 100000) {
				n -= 9091;
			}
			else if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			}
			
		}
		System.out.println(n);
	} doIt {
		int n = sc.nextInt();
		if(n >= 1000 && n <= 9999) {
			n = 909;
		}
		else if(n >= 10 && n <= 99) {
			n = 9;
		}
		else {
			if(n >= 100000) {
				n -= 9091;
			}
			else if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			}
			
		}
		System.out.println(n);
	} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc if(n >= 1000 && n <= 9999) {
			n = 909;
		}
		else if(n >= 10 && n <= 99) {
			n = 9;
		}
		else {
			if(n >= 100000) {
				n -= 9091;
			}
			else if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			}
			
		} n >= 1000 && n <= 9999 n >= 1000 n 1000 n <= 9999 n 9999 {
			n = 909;
		} n = 909 n 909 if(n >= 10 && n <= 99) {
			n = 9;
		}
		else {
			if(n >= 100000) {
				n -= 9091;
			}
			else if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			}
			
		} n >= 10 && n <= 99 n >= 10 n 10 n <= 99 n 99 {
			n = 9;
		} n = 9 n 9 {
			if(n >= 100000) {
				n -= 9091;
			}
			else if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			}
			
		} if(n >= 100000) {
				n -= 9091;
			}
			else if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			} n >= 100000 n 100000 {
				n -= 9091;
			} n -= 9091 n 9091 if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			} n >= 1000 n 1000 {
				n -= 9090;
			} n -= 9090 n 9090 if(n >= 10) {
				n-=90;
			} n >= 10 n 10 {
				n-=90;
			} n-=90 n 90 System.out.println(n) System.out.println System.out System System.out n public static void main(String[] args) {
		new Main().doIt();
	} main {
		new Main().doIt();
	} new Main().doIt() new Main().doIt new Main() String[] args args public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;
 
	void doIt() {
		int n = sc.nextInt();
		if(n >= 1000 && n <= 9999) {
			n = 909;
		}
		else if(n >= 10 && n <= 99) {
			n = 9;
		}
		else {
			if(n >= 100000) {
				n -= 9091;
			}
			else if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			}
			
		}
		System.out.println(n);
	}
 
	public static void main(String[] args) {
		new Main().doIt();
	}
} public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;
 
	void doIt() {
		int n = sc.nextInt();
		if(n >= 1000 && n <= 9999) {
			n = 909;
		}
		else if(n >= 10 && n <= 99) {
			n = 9;
		}
		else {
			if(n >= 100000) {
				n -= 9091;
			}
			else if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			}
			
		}
		System.out.println(n);
	}
 
	public static void main(String[] args) {
		new Main().doIt();
	}
} Main
import java.util.*;

public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;
 
	void doIt() {
		int n = sc.nextInt();
		if(n >= 1000 && n <= 9999) {
			n = 909;
		}
		else if(n >= 10 && n <= 99) {
			n = 9;
		}
		else {
			if(n >= 100000) {
				n -= 9091;
			}
			else if(n >= 1000) {
				n -= 9090;
			}
			else if(n >= 10) {
				n-=90;
			}
			
		}
		System.out.println(n);
	}
 
	public static void main(String[] args) {
		new Main().doIt();
	}
}