N = int(input()) K = int(input()) D = [] i = 1 while i * i <= K: if K % i == 0: j = K // i D.append(i) if i != j: D.append(j) i += 1 ans = 0 for x in D: y = K // x t = max(0, x-1 - N) a = max(0, x-1 - 2*t) t = max(0, y-1 - N) b = max(0, y-1 - 2*t) ans += a * b print(ans)