#include using namespace std; #define rep(i, n, m) for (ll i = n; i < (ll)(m); i++) #define rrep(i, n, m) for (ll i = n; i <= (ll)(m); i++) using ll = long long; int main() { // A,B Aの約数かつBの倍数の個数 ll A, B; cin >> A >> B; int ret = 0; for (int i = B; i <= A; i += B) { if (A % i == 0) ret++; } cout << ret << endl; }