#K8631. Sum of Digits

    ID: 36836 Type: Default 1000ms 256MiB

Sum of Digits

Sum of Digits

You are given a non-negative integer n. Your task is to compute the sum of its digits. Formally, if n is represented as \(n = d_k d_{k-1} \ldots d_1\) in base 10, you need to compute \(\sum_{i=1}^{k} d_i\).

For example, if n is 123, the sum of its digits is \(1+2+3=6\).

inputFormat

The input consists of a single non-negative integer n provided via standard input.

Constraints: \(0 \le n < 10^{100}\).

outputFormat

Output a single integer representing the sum of the digits of n, printed to standard output.

## sample
123
6