import java.util.Scanner; public class Main { public static void log(Object obj) { System.out.println(obj.toString()); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); char[] c = s.toCharArray(); c[c.length-1] = c[c.length-1] == '0' ? '1': '0'; log(new String(c)); } }