import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.ArrayList;
        import java.util.Collections;
        import java.util.List;
        import java.util.Scanner;

public class Main {
    static private Scanner scan = new Scanner(System.in);
    public static void main(String args[]) {
//        int int1 = Integer.parseInt(scan.next());
//        int int2 = Integer.parseInt(scan.next());

        String str1 = scan.next();
//        String str2 = scan.next();
//        String str3 = scan.next();
        int ans_int = 0;
        double ans_dob = 0;
        String ans = "";

        if(str1.charAt(0) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(1) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(2) == '1'){
            ans_int += 1;
        }


        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    }
} import java.io.PrintWriter; PrintWriter java.io import java.math.BigDecimal; BigDecimal java.math import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    static private Scanner scan = new Scanner(System.in);
    public static void main(String args[]) {
//        int int1 = Integer.parseInt(scan.next());
//        int int2 = Integer.parseInt(scan.next());

        String str1 = scan.next();
//        String str2 = scan.next();
//        String str3 = scan.next();
        int ans_int = 0;
        double ans_dob = 0;
        String ans = "";

        if(str1.charAt(0) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(1) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(2) == '1'){
            ans_int += 1;
        }


        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    }
} Main static private Scanner scan = new Scanner(System.in); scan new Scanner(System.in) public static void main(String args[]) {
//        int int1 = Integer.parseInt(scan.next());
//        int int2 = Integer.parseInt(scan.next());

        String str1 = scan.next();
//        String str2 = scan.next();
//        String str3 = scan.next();
        int ans_int = 0;
        double ans_dob = 0;
        String ans = "";

        if(str1.charAt(0) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(1) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(2) == '1'){
            ans_int += 1;
        }


        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    } main {
//        int int1 = Integer.parseInt(scan.next());
//        int int2 = Integer.parseInt(scan.next());

        String str1 = scan.next();
//        String str2 = scan.next();
//        String str3 = scan.next();
        int ans_int = 0;
        double ans_dob = 0;
        String ans = "";

        if(str1.charAt(0) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(1) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(2) == '1'){
            ans_int += 1;
        }


        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    } String str1 = scan.next(); str1 scan.next() scan.next scan int ans_int = 0; ans_int 0 double ans_dob = 0; ans_dob 0 String ans = ""; ans "" if(str1.charAt(0) == '1'){
            ans_int += 1;
        } str1.charAt(0) == '1' str1.charAt(0) str1.charAt str1 0 '1' {
            ans_int += 1;
        } ans_int += 1 ans_int 1 if(str1.charAt(1) == '1'){
            ans_int += 1;
        } str1.charAt(1) == '1' str1.charAt(1) str1.charAt str1 1 '1' {
            ans_int += 1;
        } ans_int += 1 ans_int 1 if(str1.charAt(2) == '1'){
            ans_int += 1;
        } str1.charAt(2) == '1' str1.charAt(2) str1.charAt str1 2 '1' {
            ans_int += 1;
        } ans_int += 1 ans_int 1 PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) out.println(ans_int) out.println out ans_int out.flush() out.flush out scan.close() scan.close scan String args[] args public class Main {
    static private Scanner scan = new Scanner(System.in);
    public static void main(String args[]) {
//        int int1 = Integer.parseInt(scan.next());
//        int int2 = Integer.parseInt(scan.next());

        String str1 = scan.next();
//        String str2 = scan.next();
//        String str3 = scan.next();
        int ans_int = 0;
        double ans_dob = 0;
        String ans = "";

        if(str1.charAt(0) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(1) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(2) == '1'){
            ans_int += 1;
        }


        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    }
} public class Main {
    static private Scanner scan = new Scanner(System.in);
    public static void main(String args[]) {
//        int int1 = Integer.parseInt(scan.next());
//        int int2 = Integer.parseInt(scan.next());

        String str1 = scan.next();
//        String str2 = scan.next();
//        String str3 = scan.next();
        int ans_int = 0;
        double ans_dob = 0;
        String ans = "";

        if(str1.charAt(0) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(1) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(2) == '1'){
            ans_int += 1;
        }


        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    }
} Main
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.ArrayList;
        import java.util.Collections;
        import java.util.List;
        import java.util.Scanner;

public class Main {
    static private Scanner scan = new Scanner(System.in);
    public static void main(String args[]) {
//        int int1 = Integer.parseInt(scan.next());
//        int int2 = Integer.parseInt(scan.next());

        String str1 = scan.next();
//        String str2 = scan.next();
//        String str3 = scan.next();
        int ans_int = 0;
        double ans_dob = 0;
        String ans = "";

        if(str1.charAt(0) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(1) == '1'){
            ans_int += 1;
        }
        if(str1.charAt(2) == '1'){
            ans_int += 1;
        }


        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    }
}
