#include using namespace std; #include using namespace atcoder; using ll=long long; using ld=long double; using ull=unsigned long long; using pii=pair; using pll=pair; using mint=modint998244353; const ll INF=1ll<<60; int main(){ int N; cin>>N; if(N>1200000)return 0; mint ans=0; for(int i=1;i<=N;i++){ ll a=N/i,b=N%i; ans+=(a*(a-1)/2)*i+b*a+a; } cout<