import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); int a = scan.hasNextInt() ? scan.nextInt() : -1; int b = scan.hasNextInt() ? scan.nextInt() : -1; if (a > 1000 || a < 0 || b > 1000 || b < 1) { System.out.println("入力エラー"); return; } int ans = (a | b) - (a & b); // 結果出力 System.out.println(ans); } }