import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No581 { public static void main(String[] args) throws IOException{ String[] str = new BufferedReader(new InputStreamReader(System.in)).readLine().split(" "); int a = Integer.parseInt(str[0]); int c = Integer.parseInt(str[1]); System.out.println(a^c); } }