import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
/*		char[] s = stdIn.next().toCharArray();
		
		int sum = 0;
		for(char a: s) {
			if(a == '1') {
				sum++;
			}
		}
		System.out.println(sum);*/
		int cnt = 0;
		String[] s = stdIn.next().split(""); //splitを使う。toCharArray()を使う。substring()を使う方法がある
		for(int i = 0; i < s.length; i++) {
			if(s[i].equals("1")) {
				cnt++;
			}
		}
		System.out.println(cnt);
		
		
	}

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

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
/*		char[] s = stdIn.next().toCharArray();
		
		int sum = 0;
		for(char a: s) {
			if(a == '1') {
				sum++;
			}
		}
		System.out.println(sum);*/
		int cnt = 0;
		String[] s = stdIn.next().split(""); //splitを使う。toCharArray()を使う。substring()を使う方法がある
		for(int i = 0; i < s.length; i++) {
			if(s[i].equals("1")) {
				cnt++;
			}
		}
		System.out.println(cnt);
		
		
	}

} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
/*		char[] s = stdIn.next().toCharArray();
		
		int sum = 0;
		for(char a: s) {
			if(a == '1') {
				sum++;
			}
		}
		System.out.println(sum);*/
		int cnt = 0;
		String[] s = stdIn.next().split(""); //splitを使う。toCharArray()を使う。substring()を使う方法がある
		for(int i = 0; i < s.length; i++) {
			if(s[i].equals("1")) {
				cnt++;
			}
		}
		System.out.println(cnt);
		
		
	} main {
		Scanner stdIn = new Scanner(System.in);
/*		char[] s = stdIn.next().toCharArray();
		
		int sum = 0;
		for(char a: s) {
			if(a == '1') {
				sum++;
			}
		}
		System.out.println(sum);*/
		int cnt = 0;
		String[] s = stdIn.next().split(""); //splitを使う。toCharArray()を使う。substring()を使う方法がある
		for(int i = 0; i < s.length; i++) {
			if(s[i].equals("1")) {
				cnt++;
			}
		}
		System.out.println(cnt);
		
		
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int cnt = 0; cnt 0 String[] s = stdIn.next().split(""); s stdIn.next().split("") stdIn.next().split stdIn.next() stdIn.next stdIn "" for(int i = 0; i < s.length; i++) {
			if(s[i].equals("1")) {
				cnt++;
			}
		} int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
			if(s[i].equals("1")) {
				cnt++;
			}
		} {
			if(s[i].equals("1")) {
				cnt++;
			}
		} if(s[i].equals("1")) {
				cnt++;
			} s[i].equals("1") s[i].equals s[i] s i "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 stdIn = new Scanner(System.in);
/*		char[] s = stdIn.next().toCharArray();
		
		int sum = 0;
		for(char a: s) {
			if(a == '1') {
				sum++;
			}
		}
		System.out.println(sum);*/
		int cnt = 0;
		String[] s = stdIn.next().split(""); //splitを使う。toCharArray()を使う。substring()を使う方法がある
		for(int i = 0; i < s.length; i++) {
			if(s[i].equals("1")) {
				cnt++;
			}
		}
		System.out.println(cnt);
		
		
	}

} public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
/*		char[] s = stdIn.next().toCharArray();
		
		int sum = 0;
		for(char a: s) {
			if(a == '1') {
				sum++;
			}
		}
		System.out.println(sum);*/
		int cnt = 0;
		String[] s = stdIn.next().split(""); //splitを使う。toCharArray()を使う。substring()を使う方法がある
		for(int i = 0; i < s.length; i++) {
			if(s[i].equals("1")) {
				cnt++;
			}
		}
		System.out.println(cnt);
		
		
	}

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

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
/*		char[] s = stdIn.next().toCharArray();
		
		int sum = 0;
		for(char a: s) {
			if(a == '1') {
				sum++;
			}
		}
		System.out.println(sum);*/
		int cnt = 0;
		String[] s = stdIn.next().split(""); //splitを使う。toCharArray()を使う。substring()を使う方法がある
		for(int i = 0; i < s.length; i++) {
			if(s[i].equals("1")) {
				cnt++;
			}
		}
		System.out.println(cnt);
		
		
	}

}
