import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int count = 0;
		for(int i = 0; i < 3; ++i) {
			if(str.charAt(i) == '1') {
				count++;
			}
		}
		System.out.println(count);
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int count = 0;
		for(int i = 0; i < 3; ++i) {
			if(str.charAt(i) == '1') {
				count++;
			}
		}
		System.out.println(count);
		scan.close();
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int count = 0;
		for(int i = 0; i < 3; ++i) {
			if(str.charAt(i) == '1') {
				count++;
			}
		}
		System.out.println(count);
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int count = 0;
		for(int i = 0; i < 3; ++i) {
			if(str.charAt(i) == '1') {
				count++;
			}
		}
		System.out.println(count);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan int count = 0; count 0 for(int i = 0; i < 3; ++i) {
			if(str.charAt(i) == '1') {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < 3 i 3 ++i ++i i {
			if(str.charAt(i) == '1') {
				count++;
			}
		} {
			if(str.charAt(i) == '1') {
				count++;
			}
		} if(str.charAt(i) == '1') {
				count++;
			} str.charAt(i) == '1' str.charAt(i) str.charAt str i '1' {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int count = 0;
		for(int i = 0; i < 3; ++i) {
			if(str.charAt(i) == '1') {
				count++;
			}
		}
		System.out.println(count);
		scan.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int count = 0;
		for(int i = 0; i < 3; ++i) {
			if(str.charAt(i) == '1') {
				count++;
			}
		}
		System.out.println(count);
		scan.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int count = 0;
		for(int i = 0; i < 3; ++i) {
			if(str.charAt(i) == '1') {
				count++;
			}
		}
		System.out.println(count);
		scan.close();
	}
}
