import java.util.Scanner;

class Main {

    public static void main(String[] args) {

        String str;
        int sum = 0;

        Scanner scanner = new Scanner(System.in);
        str = scanner.next();

        char c1 = str.charAt(0);
        char c2 = str.charAt(1);
        char c3 = str.charAt(2);

        if(c1 == '1') {
            sum++;
        } 

        if(c2 == '1') {
            sum++;
        } 

        if(c3 == '1') {
            sum++;
        } 


        
        System.out.println(sum);

        scanner.close() ;
    }
} import java.util.Scanner; Scanner java.util class Main {

    public static void main(String[] args) {

        String str;
        int sum = 0;

        Scanner scanner = new Scanner(System.in);
        str = scanner.next();

        char c1 = str.charAt(0);
        char c2 = str.charAt(1);
        char c3 = str.charAt(2);

        if(c1 == '1') {
            sum++;
        } 

        if(c2 == '1') {
            sum++;
        } 

        if(c3 == '1') {
            sum++;
        } 


        
        System.out.println(sum);

        scanner.close() ;
    }
} Main public static void main(String[] args) {

        String str;
        int sum = 0;

        Scanner scanner = new Scanner(System.in);
        str = scanner.next();

        char c1 = str.charAt(0);
        char c2 = str.charAt(1);
        char c3 = str.charAt(2);

        if(c1 == '1') {
            sum++;
        } 

        if(c2 == '1') {
            sum++;
        } 

        if(c3 == '1') {
            sum++;
        } 


        
        System.out.println(sum);

        scanner.close() ;
    } main {

        String str;
        int sum = 0;

        Scanner scanner = new Scanner(System.in);
        str = scanner.next();

        char c1 = str.charAt(0);
        char c2 = str.charAt(1);
        char c3 = str.charAt(2);

        if(c1 == '1') {
            sum++;
        } 

        if(c2 == '1') {
            sum++;
        } 

        if(c3 == '1') {
            sum++;
        } 


        
        System.out.println(sum);

        scanner.close() ;
    } String str; str int sum = 0; sum 0 Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) str = scanner.next() str scanner.next() scanner.next scanner char c1 = str.charAt(0); c1 str.charAt(0) str.charAt str 0 char c2 = str.charAt(1); c2 str.charAt(1) str.charAt str 1 char c3 = str.charAt(2); c3 str.charAt(2) str.charAt str 2 if(c1 == '1') {
            sum++;
        } c1 == '1' c1 '1' {
            sum++;
        } sum++ sum if(c2 == '1') {
            sum++;
        } c2 == '1' c2 '1' {
            sum++;
        } sum++ sum if(c3 == '1') {
            sum++;
        } c3 == '1' c3 '1' {
            sum++;
        } sum++ sum System.out.println(sum) System.out.println System.out System System.out sum scanner.close() scanner.close scanner String[] args args
import java.util.Scanner;

class Main {

    public static void main(String[] args) {

        String str;
        int sum = 0;

        Scanner scanner = new Scanner(System.in);
        str = scanner.next();

        char c1 = str.charAt(0);
        char c2 = str.charAt(1);
        char c3 = str.charAt(2);

        if(c1 == '1') {
            sum++;
        } 

        if(c2 == '1') {
            sum++;
        } 

        if(c3 == '1') {
            sum++;
        } 


        
        System.out.println(sum);

        scanner.close() ;
    }
}
