#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll a,b,c; cin>>a>>c; b=a^c; cout<<b<<endl; return 0; }