def solve(N, K): X = N - K ans = 0 for i in range(1, 100001): if i * i > N: break if X % i == 0: if i > K: ans += 1 if (N // i) > K: ans += 1 return ans N, K = [int(x) for x in input().split()] print(solve(N, K))