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);
	}

} 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);
	}

} 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);
	} 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);
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) char[] s = stdIn.next().toCharArray(); s stdIn.next().toCharArray() stdIn.next().toCharArray stdIn.next() stdIn.next stdIn int sum = 0; sum 0 for(char a: s) {
			if(a == '1') {
				sum++;
			}
		} char a s {
			if(a == '1') {
				sum++;
			}
		} {
			if(a == '1') {
				sum++;
			}
		} if(a == '1') {
				sum++;
			} a == '1' a '1' {
				sum++;
			} sum++ sum System.out.println(sum) System.out.println System.out System System.out sum 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);
	}

} 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);
	}

} 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);
	}

}
