#C2107. Sum of Digits

    ID: 45387 Type: Default 1000ms 256MiB

Sum of Digits

Sum of Digits

Given a string representing a non-negative integer, compute the sum of its digits. The input is provided via stdin and the result should be printed to stdout. For example, if the input is "1234", the output should be 10, since 1 + 2 + 3 + 4 = 10.

The summing process is described by the formula: \( S = \sum_{i=1}^{n} d_i \) where \( d_i \) represents the \( i^{th} \) digit of the number.

Your solution must handle large numbers and be efficient enough for competitive programming.

inputFormat

The input consists of a single line containing a string of digits that represents a non-negative integer.

Example:

1234

outputFormat

Output the sum of the digits of the given integer. The result should be printed on a single line.

Example:

10
## sample
1234
10