#include"bits/stdc++.h" using namespace std; using ll = long long; using ld = long double; using pii = pair; using pll = pair; #define FOR(k,m,n) for(ll (k)=(m);(k)<(n);(k)++) #define REP(i,n) FOR((i),0,(n)) #define WAITING(str) int str;std::cin>>str; #define DEBUGING(str) cout<< #str << " " str<> N >> K; REP(x, N * 4)FOR(y, x, x + K + 1) { if ((x&y) == N) { //cerr << x << " " << y << endl; res++; } } if (N == 0) { cout << (K == 0 ? "1" : "INF") << endl; } else { cout << res << endl; } return 0; }