import java.util.*;

public class Main {

    private static int N;
    private static int M;
    private static int[] max;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        a = a.replaceAll("0", "");
        System.out.println(a.length());
    }
} import java.util.*; util.* java public class Main {

    private static int N;
    private static int M;
    private static int[] max;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        a = a.replaceAll("0", "");
        System.out.println(a.length());
    }
} Main private static int N; N private static int M; M private static int[] max; max public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        a = a.replaceAll("0", "");
        System.out.println(a.length());
    } main {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        a = a.replaceAll("0", "");
        System.out.println(a.length());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc a = a.replaceAll("0", "") a a.replaceAll("0", "") a.replaceAll a "0" "" System.out.println(a.length()) System.out.println System.out System System.out a.length() a.length a String[] args args public class Main {

    private static int N;
    private static int M;
    private static int[] max;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        a = a.replaceAll("0", "");
        System.out.println(a.length());
    }
} public class Main {

    private static int N;
    private static int M;
    private static int[] max;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        a = a.replaceAll("0", "");
        System.out.println(a.length());
    }
} Main
import java.util.*;

public class Main {

    private static int N;
    private static int M;
    private static int[] max;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        a = a.replaceAll("0", "");
        System.out.println(a.length());
    }
}
