import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] inputStr = sc.next().split("");
        int result = 0;
        if("1".equals(inputStr[0])){
            result++;
        }
        if("1".equals(inputStr[1])){
            result++;
        }
        if("1".equals(inputStr[2])){
            result++;
        }

        System.out.println(result);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] inputStr = sc.next().split("");
        int result = 0;
        if("1".equals(inputStr[0])){
            result++;
        }
        if("1".equals(inputStr[1])){
            result++;
        }
        if("1".equals(inputStr[2])){
            result++;
        }

        System.out.println(result);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] inputStr = sc.next().split("");
        int result = 0;
        if("1".equals(inputStr[0])){
            result++;
        }
        if("1".equals(inputStr[1])){
            result++;
        }
        if("1".equals(inputStr[2])){
            result++;
        }

        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        String[] inputStr = sc.next().split("");
        int result = 0;
        if("1".equals(inputStr[0])){
            result++;
        }
        if("1".equals(inputStr[1])){
            result++;
        }
        if("1".equals(inputStr[2])){
            result++;
        }

        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] inputStr = sc.next().split(""); inputStr sc.next().split("") sc.next().split sc.next() sc.next sc "" int result = 0; result 0 if("1".equals(inputStr[0])){
            result++;
        } "1".equals(inputStr[0]) "1".equals "1" inputStr[0] inputStr 0 {
            result++;
        } result++ result if("1".equals(inputStr[1])){
            result++;
        } "1".equals(inputStr[1]) "1".equals "1" inputStr[1] inputStr 1 {
            result++;
        } result++ result if("1".equals(inputStr[2])){
            result++;
        } "1".equals(inputStr[2]) "1".equals "1" inputStr[2] inputStr 2 {
            result++;
        } result++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] inputStr = sc.next().split("");
        int result = 0;
        if("1".equals(inputStr[0])){
            result++;
        }
        if("1".equals(inputStr[1])){
            result++;
        }
        if("1".equals(inputStr[2])){
            result++;
        }

        System.out.println(result);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] inputStr = sc.next().split("");
        int result = 0;
        if("1".equals(inputStr[0])){
            result++;
        }
        if("1".equals(inputStr[1])){
            result++;
        }
        if("1".equals(inputStr[2])){
            result++;
        }

        System.out.println(result);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] inputStr = sc.next().split("");
        int result = 0;
        if("1".equals(inputStr[0])){
            result++;
        }
        if("1".equals(inputStr[1])){
            result++;
        }
        if("1".equals(inputStr[2])){
            result++;
        }

        System.out.println(result);
    }
}
