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