import java.util.*;

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

/* Process
1.in 3 String number(it's easier string than int.)
2.change 0 to " " (3 String number became only 1.)
3.search length 1 (It's answer.)
4.out results
*/ import java.util.*; util.* java public class Main {
    public static void main( String[] args) {
        int length;
        Scanner sc = new Scanner(System.in);
        String num = sc.next(); //1
        num = num.replaceAll("0", "");  //2
        length = num.length();  //3
        System.out.println(length); //4
    }
} Main public static void main( String[] args) {
        int length;
        Scanner sc = new Scanner(System.in);
        String num = sc.next(); //1
        num = num.replaceAll("0", "");  //2
        length = num.length();  //3
        System.out.println(length); //4
    } main {
        int length;
        Scanner sc = new Scanner(System.in);
        String num = sc.next(); //1
        num = num.replaceAll("0", "");  //2
        length = num.length();  //3
        System.out.println(length); //4
    } int length; length Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String num = sc.next(); num sc.next() sc.next sc num = num.replaceAll("0", "") num num.replaceAll("0", "") num.replaceAll num "0" "" length = num.length() length num.length() num.length num System.out.println(length) System.out.println System.out System System.out length String[] args args public class Main {
    public static void main( String[] args) {
        int length;
        Scanner sc = new Scanner(System.in);
        String num = sc.next(); //1
        num = num.replaceAll("0", "");  //2
        length = num.length();  //3
        System.out.println(length); //4
    }
} public class Main {
    public static void main( String[] args) {
        int length;
        Scanner sc = new Scanner(System.in);
        String num = sc.next(); //1
        num = num.replaceAll("0", "");  //2
        length = num.length();  //3
        System.out.println(length); //4
    }
} Main
import java.util.*;

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

/* Process
1.in 3 String number(it's easier string than int.)
2.change 0 to " " (3 String number became only 1.)
3.search length 1 (It's answer.)
4.out results
*/