using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static long[] NList => ReadLine().Split().Select(long.Parse).ToArray(); public static void Main() { Solve(); } static void Solve() { var n = NN; var ans = 0L; var mod = 998_244_353; for (var i = 1; i <= n; ++i) { var sq = (int)Math.Sqrt(i); var sub = 0; for (var j = 1; j <= i; ++j) { if (i / j <= sq) break; ans = (ans + i / j) % mod; ++sub; } for (var k = sq; k > 0; --k) { ans = (ans + (i / k - sub) * k) % mod; sub = i / k; } } WriteLine(ans); } }