import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//1の数
		int cnt =0;
		String S = sc.next();
for(int num =0; S.length()>num; num++) {
	if(S.charAt(num) == '1') {
		cnt++;
	}
}
		System.out.println(cnt);

	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//1の数
		int cnt =0;
		String S = sc.next();
for(int num =0; S.length()>num; num++) {
	if(S.charAt(num) == '1') {
		cnt++;
	}
}
		System.out.println(cnt);

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//1の数
		int cnt =0;
		String S = sc.next();
for(int num =0; S.length()>num; num++) {
	if(S.charAt(num) == '1') {
		cnt++;
	}
}
		System.out.println(cnt);

	} main {
		Scanner sc = new Scanner(System.in);
		//1の数
		int cnt =0;
		String S = sc.next();
for(int num =0; S.length()>num; num++) {
	if(S.charAt(num) == '1') {
		cnt++;
	}
}
		System.out.println(cnt);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int cnt =0; cnt 0 String S = sc.next(); S sc.next() sc.next sc for(int num =0; S.length()>num; num++) {
	if(S.charAt(num) == '1') {
		cnt++;
	}
} int num =0; int num =0; num 0 S.length()>num S.length() S.length S num num++ num++ num {
	if(S.charAt(num) == '1') {
		cnt++;
	}
} {
	if(S.charAt(num) == '1') {
		cnt++;
	}
} if(S.charAt(num) == '1') {
		cnt++;
	} S.charAt(num) == '1' S.charAt(num) S.charAt S num '1' {
		cnt++;
	} cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//1の数
		int cnt =0;
		String S = sc.next();
for(int num =0; S.length()>num; num++) {
	if(S.charAt(num) == '1') {
		cnt++;
	}
}
		System.out.println(cnt);

	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//1の数
		int cnt =0;
		String S = sc.next();
for(int num =0; S.length()>num; num++) {
	if(S.charAt(num) == '1') {
		cnt++;
	}
}
		System.out.println(cnt);

	}
} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//1の数
		int cnt =0;
		String S = sc.next();
for(int num =0; S.length()>num; num++) {
	if(S.charAt(num) == '1') {
		cnt++;
	}
}
		System.out.println(cnt);

	}
}