Processing math: 100%
Digit Sum - MarisaOJ: Marisa Online Judge

Digit Sum

Time limit: 1000 ms
Memory limit: 256 MB
Calculate the sum of all digits of the integer n. ### Input - An integer n. ### Output - The sum of all digits of the integer n. ### Constraints - −1018≤n≤1018. ### Example Input: 3218 Output: 14