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