#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using lint = long long; using ld = long double; using pint = pair; using plint = pair; #define MOD 998244353LL #define INF 1000000000LL #define EPS 1e-10 #define FOR(i,n,m) for(lint i=n;i<(int)m;i++) #define REP(i,n) FOR(i,0,n) #define DUMP(a) REP(d,a.size()){cout<> n >> k; if(n + 1 <= k) { cout << "INF" << endl; } else { lint ans = 0; REP(i, 2 * n + 1) { for(lint j = i; i - j <= k; j--) { if((i & j) == n) ans++; } } cout << ans << endl; } return 0; } /* --------------------------------------- */