import java.util.*;

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

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