#include int main(void){ long long int a, b = 0, c; long long int i = 1; scanf("%ld%ld", &a, &c); while(a != 0 || c != 0){ b += ((a % 2 + c % 2) % 2) * i; a /= 2; c /= 2; i *= 2; } printf("%ld\n", b); return 0; }