import java.util.Scanner;

public class Main {

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

        char array[] = new char[3];
        String s = scan.next();
        int counter = 0;
        
        array[0] = s.charAt(0);
        array[1] = s.charAt(1);
        array[2] = s.charAt(2);

        for(int i =0; i < array.length; i++) {
        	if(array[i] == '1') {
        		counter += 1;
        	}
        }
        
        System.out.println(counter);
        
	}

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

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

        char array[] = new char[3];
        String s = scan.next();
        int counter = 0;
        
        array[0] = s.charAt(0);
        array[1] = s.charAt(1);
        array[2] = s.charAt(2);

        for(int i =0; i < array.length; i++) {
        	if(array[i] == '1') {
        		counter += 1;
        	}
        }
        
        System.out.println(counter);
        
	}

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

        char array[] = new char[3];
        String s = scan.next();
        int counter = 0;
        
        array[0] = s.charAt(0);
        array[1] = s.charAt(1);
        array[2] = s.charAt(2);

        for(int i =0; i < array.length; i++) {
        	if(array[i] == '1') {
        		counter += 1;
        	}
        }
        
        System.out.println(counter);
        
	} main {
		
        Scanner scan = new Scanner(System.in);

        char array[] = new char[3];
        String s = scan.next();
        int counter = 0;
        
        array[0] = s.charAt(0);
        array[1] = s.charAt(1);
        array[2] = s.charAt(2);

        for(int i =0; i < array.length; i++) {
        	if(array[i] == '1') {
        		counter += 1;
        	}
        }
        
        System.out.println(counter);
        
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) char array[] = new char[3]; array new char[3] 3 String s = scan.next(); s scan.next() scan.next scan int counter = 0; counter 0 array[0] = s.charAt(0) array[0] array 0 s.charAt(0) s.charAt s 0 array[1] = s.charAt(1) array[1] array 1 s.charAt(1) s.charAt s 1 array[2] = s.charAt(2) array[2] array 2 s.charAt(2) s.charAt s 2 for(int i =0; i < array.length; i++) {
        	if(array[i] == '1') {
        		counter += 1;
        	}
        } int i =0; int i =0; i 0 i < array.length i array.length array array.length i++ i++ i {
        	if(array[i] == '1') {
        		counter += 1;
        	}
        } {
        	if(array[i] == '1') {
        		counter += 1;
        	}
        } if(array[i] == '1') {
        		counter += 1;
        	} array[i] == '1' array[i] array i '1' {
        		counter += 1;
        	} counter += 1 counter 1 System.out.println(counter) System.out.println System.out System System.out counter String[] args args public class Main {

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

        char array[] = new char[3];
        String s = scan.next();
        int counter = 0;
        
        array[0] = s.charAt(0);
        array[1] = s.charAt(1);
        array[2] = s.charAt(2);

        for(int i =0; i < array.length; i++) {
        	if(array[i] == '1') {
        		counter += 1;
        	}
        }
        
        System.out.println(counter);
        
	}

} public class Main {

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

        char array[] = new char[3];
        String s = scan.next();
        int counter = 0;
        
        array[0] = s.charAt(0);
        array[1] = s.charAt(1);
        array[2] = s.charAt(2);

        for(int i =0; i < array.length; i++) {
        	if(array[i] == '1') {
        		counter += 1;
        	}
        }
        
        System.out.println(counter);
        
	}

} Main
import java.util.Scanner;

public class Main {

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

        char array[] = new char[3];
        String s = scan.next();
        int counter = 0;
        
        array[0] = s.charAt(0);
        array[1] = s.charAt(1);
        array[2] = s.charAt(2);

        for(int i =0; i < array.length; i++) {
        	if(array[i] == '1') {
        		counter += 1;
        	}
        }
        
        System.out.println(counter);
        
	}

}