#include int ri() { int n; scanf("%d", &n); return n; } int64_t rll() { long long n; scanf("%lld", &n); return n; } int64_t calc(int64_t sum, int64_t max) { return std::max(0, std::min(sum - 1, max) - std::max((int64_t) 1, sum - max) + 1); } int main() { int64_t n = rll(), k = rll(); int64_t res = 0; for (int i = 2; i <= k / i; i++) { if (k % i == 0) { int64_t x = i; int64_t y = k / i; res += calc(x, n) * calc(y, n); if ((int64_t) i * i != k) { res += calc(x, n) * calc(y, n); } } } std::cout << res << std::endl; return 0; }