/* -*- coding: utf-8 -*- * * 3150.cc: No.3150 count X which satisfies with equlation - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_X = 256; /* main */ int main() { int a, b; scanf("%d%d", &a, &b); int cnt = 0; for (int x = 0; x < MAX_X; x++) if ((a | x) == b) cnt++; printf("%d\n", cnt); return 0; }