#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main(){ ll n, k, cnt = 0; cin >> n >> k; for (ll i = k + 1; i <= pow((n-k), 0.5); i++){ if (!((n-k)%i)) cnt += 2; } if (k) cnt--; cout << cnt << endl; }