import java.util.Scanner; public class No581 { public static void main(String[] args) { Scanner s = new Scanner(System.in); long a = s.nextLong(); long b = s.nextLong(); System.out.println(a ^ b); } }