#include using namespace std; int main(){ int a,b; scanf("%d %d",&a,&b); while(b!=0){ int c=(a&b)<<1; a=a^b; b=c; } printf("%d\n",a); }