Problem:
Score : 100 points

Problem Statement

Snuke prepared 6 problems for a upcoming programming contest.
For each of those problems, Rng judged whether it can be used in the contest or not.

You are given a string S of length 6.
If the i-th character of s is 1, it means that the i-th problem prepared by Snuke is accepted to be used; 0 means that the problem is not accepted.

How many problems prepared by Snuke are accepted to be used in the contest?

Constraints

The length of S is 6.

S consists of 0 and 1.

Inputs

Input is given from Standard Input in the following format:

S

Outputs

Print the number of problems prepared by Snuke that are accepted to be used in the contest.

Sample Input 1

111100

Sample Output 1

4

The first, second, third and fourth problems are accepted, for a total of four.

Sample Input 2

001001

Sample Output 2

2

Sample Input 3

000000

Sample Output 3

0

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include<stdio.h>
#include<vector>
#include<iostream> //c++
#include<algorithm>
/*
int main(){
	int a=0;
	char A[5];
	for (int i = 0; i < 5; i++) {
		scanf("%c\n", &A[i]);
	}
	
	for(int i = 0; i < 5; i++) {
		if (A[i] =='A' &&A[i + 1]=='C') {
			a = 1;
		
		}
	}
	if (a == 1) {
		printf("Yes");

	}
	else {
		printf("No");
	}
}*/

using namespace std;
/*int main() {
	int g;
	int  N,Num=0;
	vector<int>a;
	cin >> N;
	for (int i = 0; i < N;i++) {

		cin >> g;

		a.push_back(g);
	

	}
	int t,p=0;
	while (true) {
		t=a[p] ;
		a[p] = -1;
		p = t;
		if (p == -1) {
			Num = -1;
			break;
		}
			Num++;
			if (p == 2) {
				break;
			}
			p = p - 1;
	}
	cout << Num;
	

}*/

int main() {/*
	long long N,g;
	vector<int>a;
	cin >> N;
	for (int i = 0; i< N; i++) {
		cin >> g;
		a.push_back(g);
	}
	sort(a.begin(), a.end());
	long long Num1=0,Num2=0,Num;
	for (int i = 0; i < N; i++)
	{
		if (a[i] == a[i + 1] && a[i] >= Num1&&i!=N-1) {
			Num2 = Num1;
			Num1 = a[i];
			i++;
		}
	}
	Num = Num1 * Num2;
	cout << Num;
	return 0;*/
	char S[7];
	int count=0;
	scanf("%s", S);
	for (int i = 0; i < 6; i++) {
		if (S[i] = '1') {

			count++;
		}

		cout << count;
	}





}