def make_divisors(n): divisors = [] i = 1 while i * i <= n: if n % i == 0: divisors.append(i) j = n // i if i != j: divisors.append(j) i += 1 return divisors N = int(input()) K = int(input()) ans = 0 for s in make_divisors(K): a = min(s-1, N) b = max(1, s - N) n1 = max(0, a-b+1) t = K // s a = min(t-1, N) b = max(1, t - N) n2 = max(0, a-b+1) ans += n1 * n2 print(ans)