import java.util.Scanner; public class Main { static Scanner in = new Scanner(System.in); void solve() { System.out.println(in.nextLong() ^ in.nextLong()); } public static void main(String[] args) { new Main().solve(); } }