1096: 数位之和

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:276 Solved:169

Description

给定一个整数 $n$,请计算出它的每一位上的数字之和。

比如 $n$ 为 $123$:个位为 $3$、十位为 $2$、百位为 $1$。

结果为 $1+2+3$ 等于 $6$。

Input

一行,包含一个整数 $n$。

Output

输出结果。

Sample Input Copy

123

Sample Output Copy

6

HINT

数据范围:

$0 \lt n \le 10000$

Source/Category