import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;


public class D {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bfr = new BufferedReader(new InputStreamReader(System.in));
		String line="";
		BufferedWriter bfw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		while( (line = bfr.readLine())!=null  ){	
			
			StringBuffer sb = new StringBuffer(line);
			//sb.reverse();
			int[] array = new int[sb.length()+10];
			
			for(int i = 0; i<sb.length();i++){
				array[i] = (int)(sb.charAt(sb.length()-1-i)-'0');
			}
//			System.out.println(sb.toString());
//			System.out.println(Arrays.toString(array));
			if(array[0]==0){
				array[0] = 1;
			}else{
				array[0] = 2;
				
				for(int j = 0 ; j < array.length-2 ; j++){
					if(array[j]!=2){
						continue;
					}
					if( (array[j+1]==0)  ){
						array[j]=0;
						array[j+1]++;
						array[j+2]++;
					}else if(  (array[j+1]==1)  ){
						array[j]=0;
						array[j+1]=0;
						break;
					}
					else if(  (array[j+1]==2)  ){
						array[j]=0;
						array[j+1]=1;
						break;
					}
					

					
				}
			}
				
				
				boolean tisk = false;
				for(int j = array.length-1 ; j >=0 ; j--){
					if( (array[j]!=0)&&(!tisk) ){
						tisk = true;
					}
					if((tisk == true)||(j==0) ){
					bfw.write(array[j]+"");
					//System.out.print(array[j]+"");
					}
				}
				
			
			
			
				bfw.write("\n");
		}
			bfw.close();
			
//			if(sb.charAt(sb.length()-1)=='0')
//			{
//				sb.setCharAt(sb.length()-1, '1');
//				System.out.println(sb.toString());
//				continue;
//			}else{
//				sb.setCharAt(sb.length()-1, '2');
//			}
//			for(int i = sb.length()-1;i>0;i--){
//				
//				if((sb.charAt(i)=='2')&&(sb.charAt(i-1)=='2')){
//					sb.setCharAt(i, '1');
//					sb.setCharAt(i-1, '0');					
//				}
//				if((sb.charAt(i)=='2')&&(sb.charAt(i-1)!='2')){
//					sb.setCharAt(i+2, '1');	
//					sb.setCharAt(i+1, '1');						
//					sb.setCharAt(i, '0');
//						
//				}
//			}
			
		

	}

}
