import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

                Scanner scan = new Scanner(System.in);
                String[] a = scan.nextLine().split("");

                int count = 0;
                if("1".equals(a[0]))
                    count++;

                if("1".equals(a[1]))
                    count++;
                if("1".equals(a[2]))
                    count++;
                System.out.print(count);

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

    public static void main(String[] args) {

                Scanner scan = new Scanner(System.in);
                String[] a = scan.nextLine().split("");

                int count = 0;
                if("1".equals(a[0]))
                    count++;

                if("1".equals(a[1]))
                    count++;
                if("1".equals(a[2]))
                    count++;
                System.out.print(count);

            }
} Main public static void main(String[] args) {

                Scanner scan = new Scanner(System.in);
                String[] a = scan.nextLine().split("");

                int count = 0;
                if("1".equals(a[0]))
                    count++;

                if("1".equals(a[1]))
                    count++;
                if("1".equals(a[2]))
                    count++;
                System.out.print(count);

            } main {

                Scanner scan = new Scanner(System.in);
                String[] a = scan.nextLine().split("");

                int count = 0;
                if("1".equals(a[0]))
                    count++;

                if("1".equals(a[1]))
                    count++;
                if("1".equals(a[2]))
                    count++;
                System.out.print(count);

            } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String[] a = scan.nextLine().split(""); a scan.nextLine().split("") scan.nextLine().split scan.nextLine() scan.nextLine scan "" int count = 0; count 0 if("1".equals(a[0]))
                    count++; "1".equals(a[0]) "1".equals "1" a[0] a 0 count++ count if("1".equals(a[1]))
                    count++; "1".equals(a[1]) "1".equals "1" a[1] a 1 count++ count if("1".equals(a[2]))
                    count++; "1".equals(a[2]) "1".equals "1" a[2] a 2 count++ count System.out.print(count) System.out.print System.out System System.out count String[] args args public class Main {

    public static void main(String[] args) {

                Scanner scan = new Scanner(System.in);
                String[] a = scan.nextLine().split("");

                int count = 0;
                if("1".equals(a[0]))
                    count++;

                if("1".equals(a[1]))
                    count++;
                if("1".equals(a[2]))
                    count++;
                System.out.print(count);

            }
} public class Main {

    public static void main(String[] args) {

                Scanner scan = new Scanner(System.in);
                String[] a = scan.nextLine().split("");

                int count = 0;
                if("1".equals(a[0]))
                    count++;

                if("1".equals(a[1]))
                    count++;
                if("1".equals(a[2]))
                    count++;
                System.out.print(count);

            }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

                Scanner scan = new Scanner(System.in);
                String[] a = scan.nextLine().split("");

                int count = 0;
                if("1".equals(a[0]))
                    count++;

                if("1".equals(a[1]))
                    count++;
                if("1".equals(a[2]))
                    count++;
                System.out.print(count);

            }
}
