LearnPy Hub
← Data Types & Casting problems
Medium

Sum the Digits as Text

Read a non-negative integer as text and print the sum of its digits, converting each character with int().

Input

One integer.

Output

One integer.

Sample 1

Input
12345
Output
15

Sample 2

Input
0
Output
0
solution.py
Output appears here
Sum the Digits as Text · Python practice problem · LearnPy Hub