import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        int counter = 0;
        char[] in = s.next().toCharArray();
        for (int i = 0; i < 3; i++) {
            if (in[i] == '1') {
                counter++;
            }
        }

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

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        int counter = 0;
        char[] in = s.next().toCharArray();
        for (int i = 0; i < 3; i++) {
            if (in[i] == '1') {
                counter++;
            }
        }

        System.out.println(counter);
    }
} Main public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        int counter = 0;
        char[] in = s.next().toCharArray();
        for (int i = 0; i < 3; i++) {
            if (in[i] == '1') {
                counter++;
            }
        }

        System.out.println(counter);
    } main {

        Scanner s = new Scanner(System.in);

        int counter = 0;
        char[] in = s.next().toCharArray();
        for (int i = 0; i < 3; i++) {
            if (in[i] == '1') {
                counter++;
            }
        }

        System.out.println(counter);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int counter = 0; counter 0 char[] in = s.next().toCharArray(); in s.next().toCharArray() s.next().toCharArray s.next() s.next s for (int i = 0; i < 3; i++) {
            if (in[i] == '1') {
                counter++;
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            if (in[i] == '1') {
                counter++;
            }
        } {
            if (in[i] == '1') {
                counter++;
            }
        } if (in[i] == '1') {
                counter++;
            } in[i] == '1' in[i] in i '1' {
                counter++;
            } counter++ counter 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 s = new Scanner(System.in);

        int counter = 0;
        char[] in = s.next().toCharArray();
        for (int i = 0; i < 3; i++) {
            if (in[i] == '1') {
                counter++;
            }
        }

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

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        int counter = 0;
        char[] in = s.next().toCharArray();
        for (int i = 0; i < 3; i++) {
            if (in[i] == '1') {
                counter++;
            }
        }

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

public class Main {

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        int counter = 0;
        char[] in = s.next().toCharArray();
        for (int i = 0; i < 3; i++) {
            if (in[i] == '1') {
                counter++;
            }
        }

        System.out.println(counter);
    }
}