import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Tester2 { public static void main(String[] args){ try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){ String[] ary = br.readLine().split(" "); long a = Long.parseLong(ary[0]); long b = Long.parseLong(ary[1]); System.out.println(a^b); }catch(IOException e) { e.printStackTrace(); } } }