import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String str[] = s.split("");
        int count = 0;

        for (int i = 0; i < 3; i++) {
            if (str[i].equals("1")) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String str[] = s.split("");
        int count = 0;

        for (int i = 0; i < 3; i++) {
            if (str[i].equals("1")) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String str[] = s.split("");
        int count = 0;

        for (int i = 0; i < 3; i++) {
            if (str[i].equals("1")) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String str[] = s.split("");
        int count = 0;

        for (int i = 0; i < 3; i++) {
            if (str[i].equals("1")) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String str[] = s.split(""); str s.split("") s.split s "" int count = 0; count 0 for (int i = 0; i < 3; i++) {
            if (str[i].equals("1")) {
                count++;
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            if (str[i].equals("1")) {
                count++;
            }
        } {
            if (str[i].equals("1")) {
                count++;
            }
        } if (str[i].equals("1")) {
                count++;
            } str[i].equals("1") str[i].equals str[i] str i "1" {
                count++;
            } count++ count PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) out.println(count) out.println out count sc.close() sc.close sc out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String str[] = s.split("");
        int count = 0;

        for (int i = 0; i < 3; i++) {
            if (str[i].equals("1")) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String str[] = s.split("");
        int count = 0;

        for (int i = 0; i < 3; i++) {
            if (str[i].equals("1")) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} Main
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String str[] = s.split("");
        int count = 0;

        for (int i = 0; i < 3; i++) {
            if (str[i].equals("1")) {
                count++;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
}