from math import lcm n = int(input()) MOD = 998244353 l = n - 1 for i in range(1, n): l = lcm(l, i * (n - i)) l %= MOD print(l)