Problem: Luke Skywalker gave Chewbacca an integer number x. Chewbacca isn't good at numbers but he loves inverting digits in them. Inverting digit t means replacing it with digit 9 - t. 

Help Chewbacca to transform the initial number x to the minimum possible positive number by inverting some (possibly, zero) digits. The decimal representation of the final number shouldn't start with a zero.

Input

The first line contains a single integer x (1 ≤ x ≤ 1018) — the number that Luke Skywalker gave to Chewbacca.

Output

Print the minimum possible positive number that Chewbacca can obtain after inverting some digits. The number shouldn't contain leading zeroes.

Examples

Input

27


Output

22


Input

4545


Output

4444

Solution (in JAVA):

Solution:
import java.util.*;

// http://codeforces.com/contest/514/problem/A
public class ChewbaccaAndNumber {
	public static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String num = sc.nextLine();
		for(int i = 0; i<num.length(); i++)
			if(num.charAt(i) == '9' && i==0)
				System.out.print(9);
			else if(num.charAt(i) > '4')
				System.out.print('9'-num.charAt(i));
			else 
				System.out.print(num.charAt(i));
	}

	public static void rolling(int[] arr) {
		if (arr.length < 2)
			return;
		for (int i = 1; i < arr.length; i++)
			arr[i] += arr[i - 1];
	}

	public static void reverse(int[] arr) {
		for (int i = 0; i < arr.length / 2; i++) {
			int temp = arr[i];
			arr[i] = arr[arr.length - 1 - i];
			arr[arr.length - 1 - i] = temp;
		}
	}

	public static void print(String s) {
		System.out.println(s);
	}

	public static void print(long s) {
		System.out.println(s);
	}

	public static void print(int s) {
		System.out.println(s);
	}

	public static int ri() {
		return Integer.parseInt(sc.nextLine());
	}

	public static long rl() {
		return Long.parseLong(sc.nextLine());
	}

	public static double rd() {
		return Double.parseDouble(sc.nextLine());
	}

	public static String[] rsa() {
		return sc.nextLine().split(" ");
	}

	public static int[] ria() {
		String[] s = rsa();
		int[] arr = new int[s.length];
		for (int i = 0; i < arr.length; i++)
			arr[i] = Integer.parseInt(s[i]);
		return arr;
	}

	public static long[] rla() {
		String[] s = rsa();
		long[] arr = new long[s.length];
		for (int i = 0; i < arr.length; i++)
			arr[i] = Long.parseLong(s[i]);
		return arr;
	}

	public static int[] riaml(int m) {
		int[] arr = new int[m];
		for (int i = 0; i < arr.length; i++)
			arr[i] = Integer.parseInt(sc.nextLine());
		return arr;
	}

	public static long[] rlaml(int m) {
		long[] arr = new long[m];
		for (int i = 0; i < arr.length; i++)
			arr[i] = Long.parseLong(sc.nextLine());
		return arr;
	}

	public static String[] rsaml(int m) {
		String[] arr = new String[m];
		for (int i = 0; i < arr.length; i++)
			arr[i] = sc.nextLine();
		return arr;
	}
}