#K77457. Factorial Digit Sum
Factorial Digit Sum
Factorial Digit Sum
Given a non-negative integer n, compute the sum of the digits of its factorial \(n!\). Recall that the factorial of \(n\) is defined as \(n! = \prod_{i=1}^{n} i\), with the convention that \(0! = 1\). This problem requires you to calculate \(n!\) and then determine the sum of all digits in its decimal representation.
inputFormat
The input consists of a single line containing a non-negative integer n.
outputFormat
Output a single integer representing the sum of the digits of \(n!\).
## sample5
3
</p>