#define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define MT make_tuple #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)<; using vi = vector; using vll = vector; vector divisors(long long n) { vector res; for (long long i = 1; i*i <= n; ++i) { if (n%i == 0) { res.push_back(i); long long j = n / i; if (j != i)res.push_back(j); } } return res; } void solve() { ll N, K; cin >> N >> K; auto D = divisors(K); ll ans = 0; each(x, D) { ll y = K / x; // a+c ll s = min(N, x - 1) - max(1ll, x - N) + 1; ll t = min(N, y - 1) - max(1ll, y - N) + 1; if (s > 0 && t > 0) { ans += s * t; } } cout << ans << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(15); solve(); return 0; }