#include using namespace std; using ll = long long; int main(){ int n; ll ans = 0; cin >> n; for(int i = 1; i <= n; i++){ int div = n / i, r = n - div * i; ans += i * (ll)(div - 1) * div / 2 + (ll)(r + 1) * div; } cout << ans % 998244353 << '\n'; }