#C5384. Sum of Digits

    ID: 49027 Type: Default 1000ms 256MiB

Sum of Digits

Sum of Digits

Given a positive integer N, calculate the sum of its digits. Formally, if N has k digits \(d_1, d_2, \ldots, d_k\), compute the sum:

\(S = \sum_{i=1}^{k} d_i\).

This task tests your ability to process numbers and perform simple arithmetic operations. Ensure that your program reads input from standard input (stdin) and outputs the result to standard output (stdout).

inputFormat

A single line containing a positive integer N.

outputFormat

A single line containing an integer representing the sum of the digits of N.## sample

5
5

</p>