import java.util.*;
public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner reader=new Scanner(System.in);
		String s=reader.next();
		int total=0;
		if(s.charAt(0)=='1') total++;
		if(s.charAt(1)=='1') total++;
		if(s.charAt(2)=='1') total++;
		System.out.println(total);
	}

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner reader=new Scanner(System.in);
		String s=reader.next();
		int total=0;
		if(s.charAt(0)=='1') total++;
		if(s.charAt(1)=='1') total++;
		if(s.charAt(2)=='1') total++;
		System.out.println(total);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner reader=new Scanner(System.in);
		String s=reader.next();
		int total=0;
		if(s.charAt(0)=='1') total++;
		if(s.charAt(1)=='1') total++;
		if(s.charAt(2)=='1') total++;
		System.out.println(total);
	} main {
		// TODO Auto-generated method stub
		Scanner reader=new Scanner(System.in);
		String s=reader.next();
		int total=0;
		if(s.charAt(0)=='1') total++;
		if(s.charAt(1)=='1') total++;
		if(s.charAt(2)=='1') total++;
		System.out.println(total);
	} Scanner reader=new Scanner(System.in); reader new Scanner(System.in) String s=reader.next(); s reader.next() reader.next reader int total=0; total 0 if(s.charAt(0)=='1') total++; s.charAt(0)=='1' s.charAt(0) s.charAt s 0 '1' total++ total if(s.charAt(1)=='1') total++; s.charAt(1)=='1' s.charAt(1) s.charAt s 1 '1' total++ total if(s.charAt(2)=='1') total++; s.charAt(2)=='1' s.charAt(2) s.charAt s 2 '1' total++ total System.out.println(total) System.out.println System.out System System.out total String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner reader=new Scanner(System.in);
		String s=reader.next();
		int total=0;
		if(s.charAt(0)=='1') total++;
		if(s.charAt(1)=='1') total++;
		if(s.charAt(2)=='1') total++;
		System.out.println(total);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner reader=new Scanner(System.in);
		String s=reader.next();
		int total=0;
		if(s.charAt(0)=='1') total++;
		if(s.charAt(1)=='1') total++;
		if(s.charAt(2)=='1') total++;
		System.out.println(total);
	}

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner reader=new Scanner(System.in);
		String s=reader.next();
		int total=0;
		if(s.charAt(0)=='1') total++;
		if(s.charAt(1)=='1') total++;
		if(s.charAt(2)=='1') total++;
		System.out.println(total);
	}

}
