n, k = map(int, input().split()) d = n - k p = 0 for i in range(n): if n % (i + 1) == k: p += 1 print(p)