import java.util.Scanner;

public class Main {

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

        int total = 0;
        total += s.charAt(0) == '1' ? 1 : 0;
        total += s.charAt(1) == '1' ? 1 : 0;
        total += s.charAt(2) == '1' ? 1 : 0;
        System.out.println(total);

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

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

        int total = 0;
        total += s.charAt(0) == '1' ? 1 : 0;
        total += s.charAt(1) == '1' ? 1 : 0;
        total += s.charAt(2) == '1' ? 1 : 0;
        System.out.println(total);

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

        int total = 0;
        total += s.charAt(0) == '1' ? 1 : 0;
        total += s.charAt(1) == '1' ? 1 : 0;
        total += s.charAt(2) == '1' ? 1 : 0;
        System.out.println(total);

    } main {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();

        int total = 0;
        total += s.charAt(0) == '1' ? 1 : 0;
        total += s.charAt(1) == '1' ? 1 : 0;
        total += s.charAt(2) == '1' ? 1 : 0;
        System.out.println(total);

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan int total = 0; total 0 total += s.charAt(0) == '1' ? 1 : 0 total s.charAt(0) == '1' ? 1 : 0 s.charAt(0) == '1' s.charAt(0) s.charAt s 0 '1' 1 0 total += s.charAt(1) == '1' ? 1 : 0 total s.charAt(1) == '1' ? 1 : 0 s.charAt(1) == '1' s.charAt(1) s.charAt s 1 '1' 1 0 total += s.charAt(2) == '1' ? 1 : 0 total s.charAt(2) == '1' ? 1 : 0 s.charAt(2) == '1' s.charAt(2) s.charAt s 2 '1' 1 0 System.out.println(total) System.out.println System.out System System.out total String[] args args public class Main {

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

        int total = 0;
        total += s.charAt(0) == '1' ? 1 : 0;
        total += s.charAt(1) == '1' ? 1 : 0;
        total += s.charAt(2) == '1' ? 1 : 0;
        System.out.println(total);

    }
} public class Main {

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

        int total = 0;
        total += s.charAt(0) == '1' ? 1 : 0;
        total += s.charAt(1) == '1' ? 1 : 0;
        total += s.charAt(2) == '1' ? 1 : 0;
        System.out.println(total);

    }
} Main
import java.util.Scanner;

public class Main {

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

        int total = 0;
        total += s.charAt(0) == '1' ? 1 : 0;
        total += s.charAt(1) == '1' ? 1 : 0;
        total += s.charAt(2) == '1' ? 1 : 0;
        System.out.println(total);

    }
}
