def make_divisors(n): divisors = [] i = 2 while i ** 2 <= n: if n % i == 0: divisors.append(i) i += 1 divisors.sort() return divisors N = int(input()) K = int(input()) D = make_divisors(K) ans = 0 for d in D: a1, a2 = 0, 0 if d <= 2 * N: mind = max(1, d - N) maxd = d - mind a1 = maxd - mind + 1 d2 = K // d if d2 <= 2 * N: mind = max(1, d2 - N) maxd = d2 - mind a2 = maxd - mind + 1 ans += a1 * a2 * 2 print(ans)