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.*;
import java.lang.*;
import java.io.*;




/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
     
    static PrintWriter out;
    
    
	static class FastReader{
		BufferedReader br;
		StringTokenizer st;
		public FastReader(){
			br=new BufferedReader(new InputStreamReader(System.in));
			out=new PrintWriter(System.out);
		}
		String next(){
			while(st==null || !st.hasMoreElements()){
				try{
					st= new StringTokenizer(br.readLine());
				}
				catch (IOException e){
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
		int nextInt(){
			return Integer.parseInt(next());
		}
		long nextLong(){
			return Long.parseLong(next());
		}
		double nextDouble(){
			return Double.parseDouble(next());
		}
		String nextLine(){
			String str = "";
			try{
				str=br.readLine();
			}
			catch(IOException e){
				e.printStackTrace();
			}
			return str;
		}
	}
	

public static int  min(int a ,int b , int c, int d)
{
       
       
       int[] arr = new int[4] ;
       arr[0] = a;
       arr[1] = b ;
       arr[2] = c;
       arr[3] = d;
       Arrays.sort(arr) ;
       
       return arr[0];
       
}
    
    
    
	public static void main (String[] args) throws java.lang.Exception
	{
	
	FastReader scn = new FastReader() ;
	
 //	int t = scn.nextInt() ;
	
//	for(int k = 1; k<= t ; k++)
//	{
        
        
        String str =  scn.nextLine() ;
        
        int l = str.length() ;
        
        char[] arr = str.toCharArray() ;
        
        int firstDigit = arr[0] ;
        
        firstDigit = firstDigit -  48 ; 
        
        if(firstDigit >= 5 && firstDigit != 9)
        {
               firstDigit = 9 - firstDigit ;
        }
        
        arr[0] = (char)(firstDigit + 48 );
        
        
        
        for(int i = 1 ; i < l ;i++)
        {
               
               int temp = arr[i] ;
               
               temp = temp - 48 ;
               
               if(temp >=5)
               {
                      temp = 9 - temp ;
               }
             
             arr[i] = (char)(temp + 48 );  
               
        }
        
        
        for(char c : arr)
        {
               out.print(c) ;
        }
       

out.flush()  ; 
	}
	
	
}