#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) repr(i, 0, n) #define INF 2e9 #define MOD 1000000007 //#define MOD 998244353 #define LINF (long long)4e18 #define jck 3.141592 const double EPS = 1e-10; using ll = long long; using Pi = pair; using Pl = pair; int main(){ int A,B; cin >> A >> B; vector a,b; while(A > 0){ a.push_back(A%2); A /= 2; } while(a.size() < 40){ a.push_back(0); } while(B > 0){ b.push_back(B%2); B /= 2; } while(b.size() < 40){ b.push_back(0); } ll ans = 1; rep(i,40){ if(a[i] == 0 && b[i] == 1) ans *= 2; else if(a[i] == 1 && b[i] == 0) ans *= 0; } cout << ans/2 << endl; }