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