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