import sys; input = sys.stdin.buffer.readline sys.setrecursionlimit(10**7) from collections import defaultdict con = 10 ** 9 + 7; INF = float("inf") def getlist(): return list(map(int, input().split())) #処理内容 def main(): N = int(input()) K = int(input()) ans = 0 M = int(K ** 0.5 // 1) for i in range(1, M + 1): if K % i == 0: j = int(K // i) if i <= N: a = i - 1 else: a = max(2 * N - i + 1, 0) if j <= N: b = j - 1 else: b = max(2 * N - j + 1, 0) # print(i, j, a, b) if i == j: ans += a * b else: ans += 2 * a * b print(ans) if __name__ == '__main__': main()