#include using namespace std; typedef long long LL; typedef pair P; int main(){ LL N, K; cin >> N >> K; LL ans = 0; for(LL i = 1;i*i <= K;i++){ if(K%i == 0){ LL a = i; LL b = K/i; LL res = 1; if(a <= 2*N){ if(a-1 <= N) res *= a-1; else res *= 2*N-a+1; } else res = 0; if(b <= 2*N){ if(b-1 <= N) res *= b-1; else res *= 2*N-b+1; } else res = 0; ans += res; if(a != b) ans += res; } } cout << ans << endl; }