import java.util.Scanner;

public class Main {

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

		String line = sc.nextLine();
		String[] lines = line.split("");

		for (int i = 0; i < lines.length; i++) {
			if (1 == Integer.parseInt(lines[i])) {
				ballsCount++;
			}else {

			}
		}
		
		System.out.println(ballsCount);
	}

} import java.util.Scanner; Scanner java.util public class Main {

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

		String line = sc.nextLine();
		String[] lines = line.split("");

		for (int i = 0; i < lines.length; i++) {
			if (1 == Integer.parseInt(lines[i])) {
				ballsCount++;
			}else {

			}
		}
		
		System.out.println(ballsCount);
	}

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

		String line = sc.nextLine();
		String[] lines = line.split("");

		for (int i = 0; i < lines.length; i++) {
			if (1 == Integer.parseInt(lines[i])) {
				ballsCount++;
			}else {

			}
		}
		
		System.out.println(ballsCount);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int ballsCount = 0;

		String line = sc.nextLine();
		String[] lines = line.split("");

		for (int i = 0; i < lines.length; i++) {
			if (1 == Integer.parseInt(lines[i])) {
				ballsCount++;
			}else {

			}
		}
		
		System.out.println(ballsCount);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int ballsCount = 0; ballsCount 0 String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] lines = line.split(""); lines line.split("") line.split line "" for (int i = 0; i < lines.length; i++) {
			if (1 == Integer.parseInt(lines[i])) {
				ballsCount++;
			}else {

			}
		} int i = 0; int i = 0; i 0 i < lines.length i lines.length lines lines.length i++ i++ i {
			if (1 == Integer.parseInt(lines[i])) {
				ballsCount++;
			}else {

			}
		} {
			if (1 == Integer.parseInt(lines[i])) {
				ballsCount++;
			}else {

			}
		} if (1 == Integer.parseInt(lines[i])) {
				ballsCount++;
			}else {

			} 1 == Integer.parseInt(lines[i]) 1 Integer.parseInt(lines[i]) Integer.parseInt Integer lines[i] lines i {
				ballsCount++;
			} ballsCount++ ballsCount {

			} System.out.println(ballsCount) System.out.println System.out System System.out ballsCount String[] args args public class Main {

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

		String line = sc.nextLine();
		String[] lines = line.split("");

		for (int i = 0; i < lines.length; i++) {
			if (1 == Integer.parseInt(lines[i])) {
				ballsCount++;
			}else {

			}
		}
		
		System.out.println(ballsCount);
	}

} public class Main {

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

		String line = sc.nextLine();
		String[] lines = line.split("");

		for (int i = 0; i < lines.length; i++) {
			if (1 == Integer.parseInt(lines[i])) {
				ballsCount++;
			}else {

			}
		}
		
		System.out.println(ballsCount);
	}

} Main
import java.util.Scanner;

public class Main {

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

		String line = sc.nextLine();
		String[] lines = line.split("");

		for (int i = 0; i < lines.length; i++) {
			if (1 == Integer.parseInt(lines[i])) {
				ballsCount++;
			}else {

			}
		}
		
		System.out.println(ballsCount);
	}

}
