#K65392. Digit Sum Calculation

    ID: 32187 Type: Default 1000ms 256MiB

Digit Sum Calculation

Digit Sum Calculation

You are given a non-negative integer \( n \). Your task is to compute the sum of its decimal digits. If \( n \) has digits \( d_1, d_2, \dots, d_k \) such that \( n = \sum_{i=1}^{k} d_i \times 10^{(k-i)} \), you need to compute \( S = \sum_{i=1}^{k} d_i \).

For example, if \( n = 429 \), then \( S = 4 + 2 + 9 = 15 \).

inputFormat

The input consists of a single non-negative integer \( n \) provided via standard input (stdin).

outputFormat

Output a single integer representing the sum of the digits of \( n \) to standard output (stdout).

## sample
5
5