import java.io.BufferedReader; import java.io.InputStreamReader; import java.math.BigInteger; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); br.close(); BigInteger ba = new BigInteger(sa[0]); BigInteger bb = new BigInteger(sa[1]); System.out.println(ba.xor(bb).toString()); } }