#include using namespace std; int main(){ int n, k; cin >> n >> k; if(n == 0 && k == 0){ cout << 1 << endl; return 0; }else if(n == 0 && k != 0){ cout << "INF" << endl; return 0; } int tmp = 1; while(tmp <= n) tmp <<= 1; if(tmp <= k){ cout << "INF" << endl; return 0; } int ans = 0; for(int s = 0; s < (1<<18); s++){ bool ok = true; int x = n; for(int j = 0; j < 18; j++){ if(((s>>j)&1) == 1 && ((n>>j)&1) == 1) ok = false; if((s>>j)&1) x += 1<