def main(): n,k=map(int,input().split()) s = n-k d = 1 ds = set() while d*d <= s: if s%d==0: ds.add(d) ds.add(s//d) d += 1 ans = 0 for d in ds: if d >= k: ans += 1 print(ans) if __name__ == "__main__": main()