import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.nextLine();
		String[] aArray = a.split("");
		
		int res = 0;
		
		for(int i=0; i<aArray.length; i++) {
			if(aArray[i].equals("1")) {
				res++;
			}
		}
		
		System.out.println(res);
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.nextLine();
		String[] aArray = a.split("");
		
		int res = 0;
		
		for(int i=0; i<aArray.length; i++) {
			if(aArray[i].equals("1")) {
				res++;
			}
		}
		
		System.out.println(res);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.nextLine();
		String[] aArray = a.split("");
		
		int res = 0;
		
		for(int i=0; i<aArray.length; i++) {
			if(aArray[i].equals("1")) {
				res++;
			}
		}
		
		System.out.println(res);
	} main {
		Scanner sc = new Scanner(System.in);

		String a = sc.nextLine();
		String[] aArray = a.split("");
		
		int res = 0;
		
		for(int i=0; i<aArray.length; i++) {
			if(aArray[i].equals("1")) {
				res++;
			}
		}
		
		System.out.println(res);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.nextLine(); a sc.nextLine() sc.nextLine sc String[] aArray = a.split(""); aArray a.split("") a.split a "" int res = 0; res 0 for(int i=0; i<aArray.length; i++) {
			if(aArray[i].equals("1")) {
				res++;
			}
		} int i=0; int i=0; i 0 i<aArray.length i aArray.length aArray aArray.length i++ i++ i {
			if(aArray[i].equals("1")) {
				res++;
			}
		} {
			if(aArray[i].equals("1")) {
				res++;
			}
		} if(aArray[i].equals("1")) {
				res++;
			} aArray[i].equals("1") aArray[i].equals aArray[i] aArray i "1" {
				res++;
			} res++ res System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.nextLine();
		String[] aArray = a.split("");
		
		int res = 0;
		
		for(int i=0; i<aArray.length; i++) {
			if(aArray[i].equals("1")) {
				res++;
			}
		}
		
		System.out.println(res);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.nextLine();
		String[] aArray = a.split("");
		
		int res = 0;
		
		for(int i=0; i<aArray.length; i++) {
			if(aArray[i].equals("1")) {
				res++;
			}
		}
		
		System.out.println(res);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String a = sc.nextLine();
		String[] aArray = a.split("");
		
		int res = 0;
		
		for(int i=0; i<aArray.length; i++) {
			if(aArray[i].equals("1")) {
				res++;
			}
		}
		
		System.out.println(res);
	}

}
