import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No581 { public static void main(String[] args) throws IOException{ String[] str = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" "); long a = Long.parseLong(str[0]); long c = Long.parseLong(str[1]); System.out.println(a^c); } }