result = 0 c = 1 for i in reversed(range(len(input())+1)): c *= (i+1) result += c % 998244353 result %= 998244353 print(result)