import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s1=sc.next();
		String s2[]=s1.split("");
		int count=0;
		for(String s:s2) {
			if(s.equals("1")) count++;
		}
		System.out.print(count);
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s1=sc.next();
		String s2[]=s1.split("");
		int count=0;
		for(String s:s2) {
			if(s.equals("1")) count++;
		}
		System.out.print(count);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s1=sc.next();
		String s2[]=s1.split("");
		int count=0;
		for(String s:s2) {
			if(s.equals("1")) count++;
		}
		System.out.print(count);
	} main {
		Scanner sc = new Scanner(System.in);
		String s1=sc.next();
		String s2[]=s1.split("");
		int count=0;
		for(String s:s2) {
			if(s.equals("1")) count++;
		}
		System.out.print(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s1=sc.next(); s1 sc.next() sc.next sc String s2[]=s1.split(""); s2 s1.split("") s1.split s1 "" int count=0; count 0 for(String s:s2) {
			if(s.equals("1")) count++;
		} String s s2 {
			if(s.equals("1")) count++;
		} {
			if(s.equals("1")) count++;
		} if(s.equals("1")) count++; s.equals("1") s.equals s "1" count++ count System.out.print(count) System.out.print System.out System System.out count String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s1=sc.next();
		String s2[]=s1.split("");
		int count=0;
		for(String s:s2) {
			if(s.equals("1")) count++;
		}
		System.out.print(count);
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s1=sc.next();
		String s2[]=s1.split("");
		int count=0;
		for(String s:s2) {
			if(s.equals("1")) count++;
		}
		System.out.print(count);
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s1=sc.next();
		String s2[]=s1.split("");
		int count=0;
		for(String s:s2) {
			if(s.equals("1")) count++;
		}
		System.out.print(count);
	}
}