#include <iostream>
using namespace std;
int main(void){
    long a,b,ans;
    cin>>a>>b;
    ans = a^b;
    cout<<ans<<endl;
}