import java.util.*; class Main { public static void main(String[] ars) { Scanner in = new Scanner(System.in); Long a = in.nextLong(); Long c = in.nextLong(); Long b = a ^ c; System.out.println(b); } }