#include using namespace std; using ll = long long; const int INF = 1e9 + 10; const ll INFL = 4e18; /* 考察 b=N!のとき、e_b=1 b=(N!-1)のとき、e_b=0かな? N!の素因数分解ができるのか だから、e_bが1になるのはいくつ、e_bが2になるのはいくつ。。。みたいにやることを考える。 e_b=1以上となるのは、全ての素因数について指数/1以下 e_b=2以上となるのは、全ての素因数について指数/2以下 e_b=i以上となるのは、全ての素因数について指数/i以下 */ template struct ModInt { ll value; ModInt(ll x = 0) { if (x >= 0) { value = x % MOD; } else { value = MOD - (-x) % MOD; } } ModInt operator-() const { return ModInt(-value); } ModInt operator+() const { return ModInt(*this); } ModInt &operator+=(const ModInt &other) { value += other.value; if (value >= MOD) value -= MOD; return *this; } ModInt &operator-=(const ModInt &other) { value += MOD - other.value; if (value >= MOD) value -= MOD; return *this; } ModInt &operator*=(const ModInt other) { value = value * other.value % MOD; return *this; } ModInt &operator/=(ModInt other) { (*this) *= other.inv(); return *this; } ModInt operator+(const ModInt &other) const { return ModInt(*this) += other; } ModInt operator-(const ModInt &other) const { return ModInt(*this) -= other; } ModInt operator*(const ModInt &other) const { return ModInt(*this) *= other; } ModInt operator/(const ModInt &other) const { return ModInt(*this) /= other; } ModInt pow(ll x) const { ModInt ret(1), mul(value); while (x) { if (x & 1) ret *= mul; mul *= mul; x >>= 1; } return ret; } ModInt inv() const { return pow(MOD - 2); } bool operator==(const ModInt &other) const { return value == other.value; } bool operator!=(const ModInt &other) const { return value != other.value; } friend ostream &operator<<(ostream &os, const ModInt &x) { return os << x.value; } friend istream &operator>>(istream &is, ModInt &x) { ll v; is >> v; x = ModInt(v); return is; } static constexpr ll get_mod() { return MOD; } }; using Mod998 = ModInt<998244353>; using Mod107 = ModInt<1000000007>; using mint = Mod998; struct Factors { Factors(int n) { mx = n; min_factor = vector(mx + 1); is_prime = vector(mx + 1, true); is_prime[0] = is_prime[1] = false; divisors = vector>(mx + 1); prime_factors = vector>>(mx + 1); for (int i = 2; i <= mx; i++) { if (is_prime[i]) { min_factor[i] = i; for (int j = 2 * i; j <= mx; j += i) { is_prime[j] = false; if (min_factor[j] == 0) { min_factor[j] = i; } } } } } vector> get_prime_factors(int n) { if (prime_factors[n].size() == 0) { int x = n; while (x > 1) { int p = min_factor[x]; int cnt = 0; while (x % p == 0) { x /= p; cnt++; } prime_factors[n].push_back({p, cnt}); } } return prime_factors[n]; } vector get_divisors(int n) { if (divisors[n].size() == 0) { vector> pf = get_prime_factors(n); int sz = pf.size(); auto dfs = [&](auto &&dfs, int i, int x) -> void { if (i == sz) { divisors[n].push_back(x); return; } auto [p, cnt] = pf[i]; for (int j = 0; j <= cnt; j++) { dfs(dfs, i + 1, x); x *= p; } }; dfs(dfs, 0, 1); sort(divisors[n].begin(), divisors[n].end()); } return divisors[n]; } private: int mx; vector min_factor; vector is_prime; vector> divisors; vector>> prime_factors; }; int main() { int N; cin >> N; Factors fac(N); vector cnt(N + 1); int all = 0; for (int i = 2; i <= N; i++) { auto pf = fac.get_prime_factors(i); for (auto [p, e] : pf) { cnt[p] += e; all += e; } } int mx = ranges::max(cnt); vector prod(all + 1, 1); for (int i = 2; i <= N; i++) { if (cnt[i] == 0) continue; for (int j = 1; j <= cnt[i]; j++) { prod[j] *= (cnt[i] / j + 1); } } mint ans = 0; for (int i = 1; i <= mx; i++) ans += prod[i] - 1; cout << ans << endl; }