#include #define rep(i,n,m) for(int i = (n); i <(m); i++) #define rrep(i,n,m) for(int i = (n) - 1; i >=(m); i--) using namespace std; using ll = long long; int main() { ll n, k; cin >> n >> k; ll ans = 0; for (ll num = 2; num*num < k; num++) if (k % num == 0) { ll num2 = k / num; ll cnt1 = (num - 1); ll cnt2 = (num2 - 1); if (num - 1 > n) cnt1 -= 2 * (num - 1 - n); if (num2 - 1 > n) cnt2 -= 2 * (num2 - 1 - n); cnt1 = max(0LL, cnt1); cnt2 = max(0LL, cnt2); if (num == num2) ans += cnt1 * cnt2; else ans += 2 * cnt1 * cnt2; // cout << num << ' ' << num2 << ' ' << cnt1 << ' ' << cnt2 << ' ' << endl; } cout << ans << endl; return 0; }