import java.util.Scanner;

class Main{
	public static void main(String arg[]) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		sc.close();
		String[]S = s.split(""); 
		int count = 0;
		
		for(int i = 0; i < S.length; i++) {
			if(S[i].equals("1")) {
				count++;
			}
		}
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String arg[]) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		sc.close();
		String[]S = s.split(""); 
		int count = 0;
		
		for(int i = 0; i < S.length; i++) {
			if(S[i].equals("1")) {
				count++;
			}
		}
		System.out.println(count);
	}
} Main public static void main(String arg[]) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		sc.close();
		String[]S = s.split(""); 
		int count = 0;
		
		for(int i = 0; i < S.length; i++) {
			if(S[i].equals("1")) {
				count++;
			}
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		sc.close();
		String[]S = s.split(""); 
		int count = 0;
		
		for(int i = 0; i < S.length; i++) {
			if(S[i].equals("1")) {
				count++;
			}
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc sc.close() sc.close sc String[]S = s.split(""); S s.split("") s.split s "" int count = 0; count 0 for(int i = 0; i < S.length; i++) {
			if(S[i].equals("1")) {
				count++;
			}
		} 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")) {
				count++;
			}
		} {
			if(S[i].equals("1")) {
				count++;
			}
		} if(S[i].equals("1")) {
				count++;
			} S[i].equals("1") S[i].equals S[i] S i "1" {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String arg[] arg
import java.util.Scanner;

class Main{
	public static void main(String arg[]) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		sc.close();
		String[]S = s.split(""); 
		int count = 0;
		
		for(int i = 0; i < S.length; i++) {
			if(S[i].equals("1")) {
				count++;
			}
		}
		System.out.println(count);
	}
}