N, K = map(int, input().split()) N -= K ans = 0 for i in range(1, int(N ** 0.5)): if N % i == 0: if i <= K and N // i > K: ans += 1 elif N // i > K: ans += 2 elif i > K and N // i <= K: ans += 1 if int(N ** 0.5) - (N ** 0.5) < 10 ** 9: ans += 1 print(ans)