#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; map > d; map dp; ll calc(ll len) { if (dp.find(len) != dp.end()) return dp[len]; ll &ret = dp[len]; ret = 1; if (d.find(len) != d.end()) { auto &cur = d[len]; for (int j = 0; j < cur.size() && cur[j] cur; for (ll i = 1; i*i <= len; ++i) if (len%i == 0) { cur.push_back(i); if (len / i != i) cur.push_back(len / i); } sort(cur.begin(), cur.end()); d[len] = cur; for (int i = 0; i < cur.size(); ++i) { if (d.find(cur[i]) != d.end()) continue; auto &ret = d[cur[i]]; for (int j = 0; j < i; ++j) if (cur[i] % cur[j] == 0) ret.push_back(cur[j]); } res += calc(len); } printf("%lld\n", res); return 0; }