#include #include #include template std::vector divisors(T n) { std::vector ret; for (T p = 1; p * p <= n; ++p) { if (n % p != 0) continue; ret.push_back(p); if (n / p == p) continue; ret.push_back(n / p); } return ret; } using lint = long long; void solve() { lint n, k; std::cin >> n >> k; lint ans = 0; for (auto d : divisors(k)) { ans += std::max(n - std::abs(n + 1 - d), 0LL) * std::max(n - std::abs(n + 1 - k / d), 0LL); } std::cout << ans << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }