#C14403. Recursive Sum of Digits

    ID: 44049 Type: Default 1000ms 256MiB

Recursive Sum of Digits

Recursive Sum of Digits

This problem asks you to compute the sum of the digits of an integer using recursion. Given an integer \( n \), the recursive formula is defined as:

[ S(n) = n \bmod 10 + S\left( \left\lfloor\frac{n}{10}\right\rfloor \right) \quad \text{with} \quad S(0) = 0 ]

The function should correctly handle both positive and negative integers by taking the absolute value before processing.

inputFormat

The input is provided via stdin and consists of a single integer \( n \). This integer can be positive, negative, or zero.

outputFormat

The output should be printed to stdout and is a single integer representing the sum of the digits of \( n \). Note that when \( n \) is negative, the sum is computed on its absolute value.

## sample
5
5