import java.util.Scanner; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); long A = in.nextLong(); long C = in.nextLong(); long B = C^A; System.out.println(B); } }