import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); char[] s = sc.next().toCharArray(); sc.close(); int n = s.length - 1; if (s[n] == '0') { s[n] = '1'; } else { s[n] = '0'; } System.out.println(s); } }