#include using namespace std; using ll=long long; using pii=pair; #define all(a) a.begin(),a.end() #define pb push_back #define sz(a) ((int)a.size()) const int N=1000005,mod=998244353; int add(int x, int y){x+=y; if(x>=mod) x-=mod; return x;} int sub(int x, int y){x-=y; if(x<0) x+=mod; return x;} int mul(int x, int y){return ((ll)x)*y%mod;} int n; bool isp[N]; void amano_hina_is_the_goat(){ cin >> n; for(int i=2; i<=n; ++i) isp[i]=1; vector vec; for(int i=2; i<=n; ++i) if(isp[i]){ for(int j=i*2; j<=n; j+=i) isp[j]=0; int tot=0; for(ll cur=i; cur<=n; cur*=i) tot+=n/cur; vec.pb(tot); } int res=0; for(int i=1; i<=vec[0]; ++i){ int de=1; for(int j=0; j=i; ++j) de=mul(de,vec[j]/i+1); de=sub(de,1); res=add(res,de); } cout << res << "\n"; } signed main(){ ios_base::sync_with_stdio(0),cin.tie(0); cout << fixed << setprecision(20); int t=1; //cin >> t; while(t--) amano_hina_is_the_goat(); }