def div(n): if n <= 0: return [] S = set() i = 1 while i * i <= n: if n % i == 0: S.add(i) S.add(n // i) i += 1 return list(S) def f(n, d): return max(0, min(n, d - 1) - max(1, d - n) + 1) N = int(input()) K = int(input()) ans = 0 for d in div(K): ans += f(N, d) * f(N, K//d) # print(d, f(N, d) * f(N, K//d)) print(ans)