#K8606. Sum of Digits

    ID: 36780 Type: Default 1000ms 256MiB

Sum of Digits

Sum of Digits

Given a non-negative integer (n), your task is to compute the sum of its digits. For example, if (n = 1234), then the sum is (1 + 2 + 3 + 4 = 10). This is a straightforward problem designed to test basic arithmetic and string manipulation skills in various programming languages.

inputFormat

The input consists of a single line containing a non-negative integer (n). The integer is provided via the standard input (STDIN).

outputFormat

Output a single integer representing the sum of the digits of (n). The result should be printed to the standard output (STDOUT).## sample

1234
10