Problems
505 - Add The Digits
SUBMIT PROBLEM

Add The Digits

Time Limit: 1 sec

 

The Problem

SmahS is a good programmer. He loves to teach programming. One day while he was taking class he asked his students "If I give you a number can you add all the digits of that number?"

 

Example:

123 is a number.

The summation of that number 1 + 2 + 3 = 6

Can you help the student to solve this?

The Input

The input file contains a series of line. Each line contains a single integer number N (0 <= N <=1001), Input is terminated by EOF.

 

The Output

For each line of input print the summation of all the digits of that number in a separate line

 

Sample Input

123

1001

 

Sample Output

6

2

 

 

 

 

Problem Setter: Samia Safa Ahmed