#include using namespace std; int main(){ int A,C; cin>>A>>C; cout<<(A ^ C); return 0; }