#include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int a, b; cin >> a >> b; long long res = 1; for (int k = 0; k < 31; ++k) { int crr = 1 + ((a >> k & 1) != (b >> k & 1)); res *= crr; } res -= a == b; res /= 2; cout << res << '\n'; }