import java.util.*;
 
public class Main {
	public static void main(String[] args) {
    	Scanner scanner = new Scanner(System.in);
        	String a = scanner.next();
          	List<String> split = Arrays.asList(a.split(""));
            
            int count = 0;
            for(int i = 0; i<3; i++){
            	if(split.get(i).equals("1")){
                	count += 1;
                }
            }    
        System.out.println(count); 
      }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
    	Scanner scanner = new Scanner(System.in);
        	String a = scanner.next();
          	List<String> split = Arrays.asList(a.split(""));
            
            int count = 0;
            for(int i = 0; i<3; i++){
            	if(split.get(i).equals("1")){
                	count += 1;
                }
            }    
        System.out.println(count); 
      }
} Main public static void main(String[] args) {
    	Scanner scanner = new Scanner(System.in);
        	String a = scanner.next();
          	List<String> split = Arrays.asList(a.split(""));
            
            int count = 0;
            for(int i = 0; i<3; i++){
            	if(split.get(i).equals("1")){
                	count += 1;
                }
            }    
        System.out.println(count); 
      } main {
    	Scanner scanner = new Scanner(System.in);
        	String a = scanner.next();
          	List<String> split = Arrays.asList(a.split(""));
            
            int count = 0;
            for(int i = 0; i<3; i++){
            	if(split.get(i).equals("1")){
                	count += 1;
                }
            }    
        System.out.println(count); 
      } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String a = scanner.next(); a scanner.next() scanner.next scanner List<String> split = Arrays.asList(a.split("")); split Arrays.asList(a.split("")) Arrays.asList Arrays a.split("") a.split a "" int count = 0; count 0 for(int i = 0; i<3; i++){
            	if(split.get(i).equals("1")){
                	count += 1;
                }
            } int i = 0; int i = 0; i 0 i<3 i 3 i++ i++ i {
            	if(split.get(i).equals("1")){
                	count += 1;
                }
            } {
            	if(split.get(i).equals("1")){
                	count += 1;
                }
            } if(split.get(i).equals("1")){
                	count += 1;
                } split.get(i).equals("1") split.get(i).equals split.get(i) split.get split i "1" {
                	count += 1;
                } count += 1 count 1 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main(String[] args) {
    	Scanner scanner = new Scanner(System.in);
        	String a = scanner.next();
          	List<String> split = Arrays.asList(a.split(""));
            
            int count = 0;
            for(int i = 0; i<3; i++){
            	if(split.get(i).equals("1")){
                	count += 1;
                }
            }    
        System.out.println(count); 
      }
} public class Main {
	public static void main(String[] args) {
    	Scanner scanner = new Scanner(System.in);
        	String a = scanner.next();
          	List<String> split = Arrays.asList(a.split(""));
            
            int count = 0;
            for(int i = 0; i<3; i++){
            	if(split.get(i).equals("1")){
                	count += 1;
                }
            }    
        System.out.println(count); 
      }
} Main
import java.util.*;
 
public class Main {
	public static void main(String[] args) {
    	Scanner scanner = new Scanner(System.in);
        	String a = scanner.next();
          	List<String> split = Arrays.asList(a.split(""));
            
            int count = 0;
            for(int i = 0; i<3; i++){
            	if(split.get(i).equals("1")){
                	count += 1;
                }
            }    
        System.out.println(count); 
      }
}