import java.util.Scanner;

// https://atcoder.jp/contests/abc081/tasks/abc081_a
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		String str = scanner.nextLine();

		int count = str.length() - str.replaceAll("1", "").length();
		System.out.println(count);

		scanner.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		String str = scanner.nextLine();

		int count = str.length() - str.replaceAll("1", "").length();
		System.out.println(count);

		scanner.close();
	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		String str = scanner.nextLine();

		int count = str.length() - str.replaceAll("1", "").length();
		System.out.println(count);

		scanner.close();
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		String str = scanner.nextLine();

		int count = str.length() - str.replaceAll("1", "").length();
		System.out.println(count);

		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String str = scanner.nextLine(); str scanner.nextLine() scanner.nextLine scanner int count = str.length() - str.replaceAll("1", "").length(); count str.length() - str.replaceAll("1", "").length() str.length() str.length str str.replaceAll("1", "").length() str.replaceAll("1", "").length str.replaceAll("1", "") str.replaceAll str "1" "" System.out.println(count) System.out.println System.out System System.out count scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		String str = scanner.nextLine();

		int count = str.length() - str.replaceAll("1", "").length();
		System.out.println(count);

		scanner.close();
	}
} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		String str = scanner.nextLine();

		int count = str.length() - str.replaceAll("1", "").length();
		System.out.println(count);

		scanner.close();
	}
} Main
import java.util.Scanner;

// https://atcoder.jp/contests/abc081/tasks/abc081_a
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		String str = scanner.nextLine();

		int count = str.length() - str.replaceAll("1", "").length();
		System.out.println(count);

		scanner.close();
	}
}