import java.util.Scanner;



public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		//
		//        int a = scan.nextInt();
		//        int b = scan.nextInt();
		//        int c = scan.nextInt();

		String s = scan.next();
		char[] c = s.toCharArray();

		int cunt = 0;

	//	for (int i = 0; i < c.length; i++) {
			if (c[0] == '1') // looking for 'a' only
				cunt++;
			if (c[1] == '1')
				cunt++;
			if (c[2] == '1') {
				cunt++;
			}
		//}
		System.out.println(cunt);

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		//
		//        int a = scan.nextInt();
		//        int b = scan.nextInt();
		//        int c = scan.nextInt();

		String s = scan.next();
		char[] c = s.toCharArray();

		int cunt = 0;

	//	for (int i = 0; i < c.length; i++) {
			if (c[0] == '1') // looking for 'a' only
				cunt++;
			if (c[1] == '1')
				cunt++;
			if (c[2] == '1') {
				cunt++;
			}
		//}
		System.out.println(cunt);

	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		//
		//        int a = scan.nextInt();
		//        int b = scan.nextInt();
		//        int c = scan.nextInt();

		String s = scan.next();
		char[] c = s.toCharArray();

		int cunt = 0;

	//	for (int i = 0; i < c.length; i++) {
			if (c[0] == '1') // looking for 'a' only
				cunt++;
			if (c[1] == '1')
				cunt++;
			if (c[2] == '1') {
				cunt++;
			}
		//}
		System.out.println(cunt);

	} main {
		Scanner scan = new Scanner(System.in);
		//
		//        int a = scan.nextInt();
		//        int b = scan.nextInt();
		//        int c = scan.nextInt();

		String s = scan.next();
		char[] c = s.toCharArray();

		int cunt = 0;

	//	for (int i = 0; i < c.length; i++) {
			if (c[0] == '1') // looking for 'a' only
				cunt++;
			if (c[1] == '1')
				cunt++;
			if (c[2] == '1') {
				cunt++;
			}
		//}
		System.out.println(cunt);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan char[] c = s.toCharArray(); c s.toCharArray() s.toCharArray s int cunt = 0; cunt 0 if (c[0] == '1') // looking for 'a' only
				cunt++; c[0] == '1' c[0] c 0 '1' cunt++ cunt if (c[1] == '1')
				cunt++; c[1] == '1' c[1] c 1 '1' cunt++ cunt if (c[2] == '1') {
				cunt++;
			} c[2] == '1' c[2] c 2 '1' {
				cunt++;
			} cunt++ cunt System.out.println(cunt) System.out.println System.out System System.out cunt String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		//
		//        int a = scan.nextInt();
		//        int b = scan.nextInt();
		//        int c = scan.nextInt();

		String s = scan.next();
		char[] c = s.toCharArray();

		int cunt = 0;

	//	for (int i = 0; i < c.length; i++) {
			if (c[0] == '1') // looking for 'a' only
				cunt++;
			if (c[1] == '1')
				cunt++;
			if (c[2] == '1') {
				cunt++;
			}
		//}
		System.out.println(cunt);

	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		//
		//        int a = scan.nextInt();
		//        int b = scan.nextInt();
		//        int c = scan.nextInt();

		String s = scan.next();
		char[] c = s.toCharArray();

		int cunt = 0;

	//	for (int i = 0; i < c.length; i++) {
			if (c[0] == '1') // looking for 'a' only
				cunt++;
			if (c[1] == '1')
				cunt++;
			if (c[2] == '1') {
				cunt++;
			}
		//}
		System.out.println(cunt);

	}
} Main
import java.util.Scanner;



public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		//
		//        int a = scan.nextInt();
		//        int b = scan.nextInt();
		//        int c = scan.nextInt();

		String s = scan.next();
		char[] c = s.toCharArray();

		int cunt = 0;

	//	for (int i = 0; i < c.length; i++) {
			if (c[0] == '1') // looking for 'a' only
				cunt++;
			if (c[1] == '1')
				cunt++;
			if (c[2] == '1') {
				cunt++;
			}
		//}
		System.out.println(cunt);

	}
}