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.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.MathContext;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Arrays.fill;
import static java.util.Collections.*;
 public class me {
	public static void main(String args[])
 {
 Scanner br=new Scanner(System.in);
String s=br.next();

//System.out.println(s);
if(s.length()==1 && (s.equals("9")||s.equals("8")||s.equals("7")||s.equals("6")||s.equals("5")))
System.out.println(s);
else{
    int flag=0;
for(int i=0;i<s.length();i++)
{
    if(s.charAt(i)=='9'&& flag==1)
    System.out.print('0');
    else if(s.charAt(i)=='9'&& flag==0)
    {System.out.print('9');
    flag=1;}
    else  if(s.charAt(i)=='8')
    {System.out.print('1');
    flag=1;}
    else  if(s.charAt(i)=='7')
    {System.out.print('2');
    flag=1;}
    else  if(s.charAt(i)=='6')
    {System.out.print('3');
    flag=1;}
    else if(s.charAt(i)=='5')
    {System.out.print('4');
    flag=1;}
    else
    {System.out.print(s.charAt(i));
    flag=1;}
}
}
}
}