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