#include using namespace std; #define rep(i, n) for(int i = 0; i< (int)(n); i++) using ll = long long; using ull = unsigned long long; using vi = vector; ll INF = 2e18; #define Yes cout << "Yes" << endl #define No cout << "No" << endl #define YN {cout<<"Yes"<>a>>b; for(int i=1; i<10000; i++) { ll t = (a^i); if(t==b) { cout << i << endl; return 0; } } */ int a,b; cin>>a>>b; int ans = 0; for(int i=0; i<10000; i++) { int t = a|i; if(t == b) ans++; } cout << ans << endl; }