import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		String n = in.nextLine();
		int num = 0;
		
		for (int i = 0; i < n.length();i++){
			if(n.charAt(i) == '1')
				num += 9 * Math.pow(10, 2 - i);
			else
				num += Math.pow(10, 2 - i);
		}
		
		System.out.println(num);

	}

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

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		String n = in.nextLine();
		int num = 0;
		
		for (int i = 0; i < n.length();i++){
			if(n.charAt(i) == '1')
				num += 9 * Math.pow(10, 2 - i);
			else
				num += Math.pow(10, 2 - i);
		}
		
		System.out.println(num);

	}

} Main public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		String n = in.nextLine();
		int num = 0;
		
		for (int i = 0; i < n.length();i++){
			if(n.charAt(i) == '1')
				num += 9 * Math.pow(10, 2 - i);
			else
				num += Math.pow(10, 2 - i);
		}
		
		System.out.println(num);

	} main {
		
		Scanner in = new Scanner(System.in);
		String n = in.nextLine();
		int num = 0;
		
		for (int i = 0; i < n.length();i++){
			if(n.charAt(i) == '1')
				num += 9 * Math.pow(10, 2 - i);
			else
				num += Math.pow(10, 2 - i);
		}
		
		System.out.println(num);

	} Scanner in = new Scanner(System.in); in new Scanner(System.in) String n = in.nextLine(); n in.nextLine() in.nextLine in int num = 0; num 0 for (int i = 0; i < n.length();i++){
			if(n.charAt(i) == '1')
				num += 9 * Math.pow(10, 2 - i);
			else
				num += Math.pow(10, 2 - i);
		} int i = 0; int i = 0; i 0 i < n.length() i n.length() n.length n i++ i++ i {
			if(n.charAt(i) == '1')
				num += 9 * Math.pow(10, 2 - i);
			else
				num += Math.pow(10, 2 - i);
		} {
			if(n.charAt(i) == '1')
				num += 9 * Math.pow(10, 2 - i);
			else
				num += Math.pow(10, 2 - i);
		} if(n.charAt(i) == '1')
				num += 9 * Math.pow(10, 2 - i);
			else
				num += Math.pow(10, 2 - i); n.charAt(i) == '1' n.charAt(i) n.charAt n i '1' num += 9 * Math.pow(10, 2 - i) num 9 * Math.pow(10, 2 - i) 9 Math.pow(10, 2 - i) Math.pow Math 10 2 - i 2 i num += Math.pow(10, 2 - i) num Math.pow(10, 2 - i) Math.pow Math 10 2 - i 2 i System.out.println(num) System.out.println System.out System System.out num String[] args args public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		String n = in.nextLine();
		int num = 0;
		
		for (int i = 0; i < n.length();i++){
			if(n.charAt(i) == '1')
				num += 9 * Math.pow(10, 2 - i);
			else
				num += Math.pow(10, 2 - i);
		}
		
		System.out.println(num);

	}

} public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		String n = in.nextLine();
		int num = 0;
		
		for (int i = 0; i < n.length();i++){
			if(n.charAt(i) == '1')
				num += 9 * Math.pow(10, 2 - i);
			else
				num += Math.pow(10, 2 - i);
		}
		
		System.out.println(num);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		String n = in.nextLine();
		int num = 0;
		
		for (int i = 0; i < n.length();i++){
			if(n.charAt(i) == '1')
				num += 9 * Math.pow(10, 2 - i);
			else
				num += Math.pow(10, 2 - i);
		}
		
		System.out.println(num);

	}

}
