import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String word = sc.next();
		String[] judge = word.split("");

		int cnt = 0;

		for(int i = 0; i <= 2 ; i++) {

			if (judge[i].equals("1")) {
				cnt++;
			}else {
			}
		}
		System.out.println(cnt);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String word = sc.next();
		String[] judge = word.split("");

		int cnt = 0;

		for(int i = 0; i <= 2 ; i++) {

			if (judge[i].equals("1")) {
				cnt++;
			}else {
			}
		}
		System.out.println(cnt);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String word = sc.next();
		String[] judge = word.split("");

		int cnt = 0;

		for(int i = 0; i <= 2 ; i++) {

			if (judge[i].equals("1")) {
				cnt++;
			}else {
			}
		}
		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		String word = sc.next();
		String[] judge = word.split("");

		int cnt = 0;

		for(int i = 0; i <= 2 ; i++) {

			if (judge[i].equals("1")) {
				cnt++;
			}else {
			}
		}
		System.out.println(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String word = sc.next(); word sc.next() sc.next sc String[] judge = word.split(""); judge word.split("") word.split word "" int cnt = 0; cnt 0 for(int i = 0; i <= 2 ; i++) {

			if (judge[i].equals("1")) {
				cnt++;
			}else {
			}
		} int i = 0; int i = 0; i 0 i <= 2 i 2 i++ i++ i {

			if (judge[i].equals("1")) {
				cnt++;
			}else {
			}
		} {

			if (judge[i].equals("1")) {
				cnt++;
			}else {
			}
		} if (judge[i].equals("1")) {
				cnt++;
			}else {
			} judge[i].equals("1") judge[i].equals judge[i] judge i "1" {
				cnt++;
			} cnt++ cnt {
			} System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String word = sc.next();
		String[] judge = word.split("");

		int cnt = 0;

		for(int i = 0; i <= 2 ; i++) {

			if (judge[i].equals("1")) {
				cnt++;
			}else {
			}
		}
		System.out.println(cnt);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String word = sc.next();
		String[] judge = word.split("");

		int cnt = 0;

		for(int i = 0; i <= 2 ; i++) {

			if (judge[i].equals("1")) {
				cnt++;
			}else {
			}
		}
		System.out.println(cnt);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String word = sc.next();
		String[] judge = word.split("");

		int cnt = 0;

		for(int i = 0; i <= 2 ; i++) {

			if (judge[i].equals("1")) {
				cnt++;
			}else {
			}
		}
		System.out.println(cnt);
	}
}