import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String s = sc.next();
		int count = s.length() - s.replaceAll("1", "").length();
		// 出力
		System.out.println(count);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String s = sc.next();
		int count = s.length() - s.replaceAll("1", "").length();
		// 出力
		System.out.println(count);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String s = sc.next();
		int count = s.length() - s.replaceAll("1", "").length();
		// 出力
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String s = sc.next();
		int count = s.length() - s.replaceAll("1", "").length();
		// 出力
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int count = s.length() - s.replaceAll("1", "").length(); count s.length() - s.replaceAll("1", "").length() s.length() s.length s s.replaceAll("1", "").length() s.replaceAll("1", "").length s.replaceAll("1", "") s.replaceAll s "1" "" System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String s = sc.next();
		int count = s.length() - s.replaceAll("1", "").length();
		// 出力
		System.out.println(count);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String s = sc.next();
		int count = s.length() - s.replaceAll("1", "").length();
		// 出力
		System.out.println(count);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String s = sc.next();
		int count = s.length() - s.replaceAll("1", "").length();
		// 出力
		System.out.println(count);
	}
}
