N = int(input()) K = int(input()) def make_divs(n): divs = set() i = 1 while i * i <= n: if n % i == 0: divs.add(i) divs.add(n // i) i += 1 return divs def cnt(x): l = max(1, x - N) r = min(x - 1, N) return max(0, r - l + 1) ans = 0 for d in make_divs(K): ans += cnt(d) * cnt(K // d) print(ans)