#include using namespace std; int main() { cin.tie(0); cout.tie(0); ios::sync_with_stdio(false); long N, K; cin >> N >> K; N -= K; int ans = 0; for(long i = 1; i * i <= N; i++) { if(N % i == 0) { long j = N / i; if(i > K) { ans++; } if(j > K && i != j) { ans++; } } } cout << ans << '\n'; return 0; }