#K77457. Factorial Digit Sum

    ID: 34868 Type: Default 1000ms 256MiB

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!\).

## sample
5
3

</p>