题目描述
Problem Description
Snuke prepared 6 problems for a programming contest. For each of the problems prepared by Snuke, Ringo decided whether to adopt them for the programming contest or not.
A string \( S \) of length 6 is given, where the \( i \)-th character being 1 indicates that the \( i \)-th problem prepared by Snuke is adopted, and 0 indicates that it is not adopted.
How many problems prepared by Snuke were adopted for the programming contest?
Input Format
The input is given from the standard input in the following format:
\( S \)
Output Format
Output the number of problems prepared by Snuke that were adopted for the programming contest.
Sample Input and Output
Sample Input #1
111100
Sample Output #1
4
Sample Input #2
001001
Sample Output #2
2
Sample Input #3
000000
Sample Output #3
0
Notes/Hints
Constraints
- The length of \( S \) is 6.
- \( S \) consists only of
0and1.
Sample Explanation 1
A total of 4 problems from the 1st, 2nd, 3rd, and 4th were adopted.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
111100
样例输出
4