#include using namespace std; int main(){ int a,b; cin >> a >> b; while(b != 0){ int c = (a & b) << 1; a ^= b; b = c; } cout << a << endl; }