#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } #include using mint = atcoder::modint998244353; int main() { fast_io(); int n; cin >> n; vector factors; { bool is_p[n + 1]; for (int i = 0; i <= n; i++) is_p[i] = true; is_p[0] = is_p[1] = false; for (int i = 2; i <= n; i++) { if (is_p[i]) { for (int j = i * 2; j <= n; j += i) { is_p[j] = false; } int cnt = 0; for (int j = i;; j *= i) { cnt += n / j; if (n / j < i) break; } factors.push_back(cnt); } } } map cnt; for (int j : factors) { cnt[j]++; } int M = factors[0]; mint ans = 0; for (int i = 1; i <= M; i++) { mint tmp = 1; auto it = cnt.lower_bound(i); while (it != cnt.end()) { tmp *= mint(it->first / i + 1).pow(it->second); it++; } ans += tmp - 1; } cout << ans.val() << endl; }