import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String ss[] = new String[3];
		sc.close();

		int count = 0;
		for(int i = 0; i < ss.length; i++) {
			ss[i] = str.substring(i , i + 1);
			if(ss[i].equals("1")) {
				count++;
			}else {
				continue;
			}
		}

		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String ss[] = new String[3];
		sc.close();

		int count = 0;
		for(int i = 0; i < ss.length; i++) {
			ss[i] = str.substring(i , i + 1);
			if(ss[i].equals("1")) {
				count++;
			}else {
				continue;
			}
		}

		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String ss[] = new String[3];
		sc.close();

		int count = 0;
		for(int i = 0; i < ss.length; i++) {
			ss[i] = str.substring(i , i + 1);
			if(ss[i].equals("1")) {
				count++;
			}else {
				continue;
			}
		}

		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String ss[] = new String[3];
		sc.close();

		int count = 0;
		for(int i = 0; i < ss.length; i++) {
			ss[i] = str.substring(i , i + 1);
			if(ss[i].equals("1")) {
				count++;
			}else {
				continue;
			}
		}

		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc String ss[] = new String[3]; ss new String[3] 3 sc.close() sc.close sc int count = 0; count 0 for(int i = 0; i < ss.length; i++) {
			ss[i] = str.substring(i , i + 1);
			if(ss[i].equals("1")) {
				count++;
			}else {
				continue;
			}
		} int i = 0; int i = 0; i 0 i < ss.length i ss.length ss ss.length i++ i++ i {
			ss[i] = str.substring(i , i + 1);
			if(ss[i].equals("1")) {
				count++;
			}else {
				continue;
			}
		} {
			ss[i] = str.substring(i , i + 1);
			if(ss[i].equals("1")) {
				count++;
			}else {
				continue;
			}
		} ss[i] = str.substring(i , i + 1) ss[i] ss i str.substring(i , i + 1) str.substring str i i + 1 i 1 if(ss[i].equals("1")) {
				count++;
			}else {
				continue;
			} ss[i].equals("1") ss[i].equals ss[i] ss i "1" {
				count++;
			} count++ count {
				continue;
			} continue; System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String ss[] = new String[3];
		sc.close();

		int count = 0;
		for(int i = 0; i < ss.length; i++) {
			ss[i] = str.substring(i , i + 1);
			if(ss[i].equals("1")) {
				count++;
			}else {
				continue;
			}
		}

		System.out.println(count);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String ss[] = new String[3];
		sc.close();

		int count = 0;
		for(int i = 0; i < ss.length; i++) {
			ss[i] = str.substring(i , i + 1);
			if(ss[i].equals("1")) {
				count++;
			}else {
				continue;
			}
		}

		System.out.println(count);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String ss[] = new String[3];
		sc.close();

		int count = 0;
		for(int i = 0; i < ss.length; i++) {
			ss[i] = str.substring(i , i + 1);
			if(ss[i].equals("1")) {
				count++;
			}else {
				continue;
			}
		}

		System.out.println(count);
	}
}