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