#include using namespace std; using ll = long long; int main() { ll N, K; cin >> N >> K; ll t = N - K; ll ans = 0; for(ll i = 1; i * i <= t; i++) { if(t % i == 0) { if(i > K) ans++; if(i != t / i and t / i > K) ans++; } } cout << ans << endl; }