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