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