from math import sqrt def inpl(): return list(map(int, input().split())) N = int(input()) K = int(input()) ans = 0 def calc(z): if z <= N+1: return z-1 elif z > 2*N: return 0 else: return 2*N - z + 1 for x in range(1, int(sqrt(K))+1): if K%x: continue y = K//x ans += (1+(x!=y))*calc(x)*calc(y) print(ans)