import java.io.BufferedReader;
import java.io.InputStreamReader;

public class more {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		BufferedReader bfr = new BufferedReader(new InputStreamReader(System.in));
		
		try {
			String line = bfr.readLine();
			while (line != null) {
				
				StringBuilder sb = new StringBuilder(line);
				sb = sb.reverse();
				
				sb = add(sb, 0);
				
				sb = sb.reverse();
				while ((sb.charAt(0) == '0')) {
					sb = new StringBuilder(sb.substring(1, sb.length()));
					if (sb.length() == 0) break;
				}
				if (sb.length() == 0) {
					System.out.println("0");
				}
				else { 
					System.out.println(sb.toString());
				}
				line = bfr.readLine();
			}
			
			
		} catch (Exception e) {
//			e.printStackTrace();
		}

	}
	
	private static StringBuilder add(StringBuilder a, int i) {
		//System.out.println(a.toString() + " " + i);
		
		StringBuilder sb = new StringBuilder(a.toString() + "00");
		
		if (sb.charAt(i) == '0') {
			if (sb.charAt(i+1) == '0') {
				// 00
				sb.setCharAt(i, '1');
				return sb;
			}
			else {
				// 01
				sb.setCharAt(i, '1');
				sb.setCharAt(i+1, '1');
				return sb;
			}
		}
		
		if (sb.charAt(i) == '1') {
			if (sb.charAt(i+1) == '0') {
				// 10
				sb.setCharAt(i, '0');
				sb.setCharAt(i+1, '1');
				sb = add(sb, i+2);
				return sb;
			}
			else {
				// 11
				sb.setCharAt(i, '0');
				sb.setCharAt(i+1, '0');
				return sb;
			}
		}
		
		return null;
	}

}
