
import java.util.Scanner;

public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		sc.close();
		int count = 0;

		for (int i = 0; i < 3; i++) {
			if (s.charAt(i) == '1') {
				count++;
			}
		}
		System.out.print(count);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		sc.close();
		int count = 0;

		for (int i = 0; i < 3; i++) {
			if (s.charAt(i) == '1') {
				count++;
			}
		}
		System.out.print(count);
	}
} Main public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		sc.close();
		int count = 0;

		for (int i = 0; i < 3; i++) {
			if (s.charAt(i) == '1') {
				count++;
			}
		}
		System.out.print(count);
	} main {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		sc.close();
		int count = 0;

		for (int i = 0; i < 3; i++) {
			if (s.charAt(i) == '1') {
				count++;
			}
		}
		System.out.print(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc int count = 0; count 0 for (int i = 0; i < 3; i++) {
			if (s.charAt(i) == '1') {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			if (s.charAt(i) == '1') {
				count++;
			}
		} {
			if (s.charAt(i) == '1') {
				count++;
			}
		} if (s.charAt(i) == '1') {
				count++;
			} s.charAt(i) == '1' s.charAt(i) s.charAt s i '1' {
				count++;
			} count++ count System.out.print(count) System.out.print System.out System System.out count String arg[] arg public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		sc.close();
		int count = 0;

		for (int i = 0; i < 3; i++) {
			if (s.charAt(i) == '1') {
				count++;
			}
		}
		System.out.print(count);
	}
} public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		sc.close();
		int count = 0;

		for (int i = 0; i < 3; i++) {
			if (s.charAt(i) == '1') {
				count++;
			}
		}
		System.out.print(count);
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		sc.close();
		int count = 0;

		for (int i = 0; i < 3; i++) {
			if (s.charAt(i) == '1') {
				count++;
			}
		}
		System.out.print(count);
	}
}
