#include #include using namespace std; using namespace atcoder; using ll = int_fast64_t; using ull = uint_fast64_t; using mint = modint998244353; constexpr ll INF = 1ll << 60; #define iscontain(container, value) (find(container.begin(), container.end(), value) != container.end()) template void printelem(const T& container, const D& divide){ for(const auto& i : container) cout << i << divide; cout << endl; } template void printelem(const T& container) { printelem(container, ", "); } template T input(){ T ret; cin >> ret; return ret; } int main(){ //インプット ll N, K; cin >> N >> K; if(K == 0){ cout << 2; return 0; } ll ans = 0; for(ll i = 1; i*i <= N-K; i++){ if((N-K)%i == 0){ if(N%i != 0) ans++; if(N%((N-K)/i) != 0) ans++; } } //アウトプット cout << ans; return 0; }