import java.util.*;

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

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