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