import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String text = sc.next();
		String[] texts = text.split("");
		int count = 0;
		for (String s : texts) {
			if(s.equals("1")) {
				count++;
			}
		}
		System.out.println(count);
		sc.close();
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String text = sc.next();
		String[] texts = text.split("");
		int count = 0;
		for (String s : texts) {
			if(s.equals("1")) {
				count++;
			}
		}
		System.out.println(count);
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String text = sc.next();
		String[] texts = text.split("");
		int count = 0;
		for (String s : texts) {
			if(s.equals("1")) {
				count++;
			}
		}
		System.out.println(count);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String text = sc.next();
		String[] texts = text.split("");
		int count = 0;
		for (String s : texts) {
			if(s.equals("1")) {
				count++;
			}
		}
		System.out.println(count);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String text = sc.next(); text sc.next() sc.next sc String[] texts = text.split(""); texts text.split("") text.split text "" int count = 0; count 0 for (String s : texts) {
			if(s.equals("1")) {
				count++;
			}
		} String s texts {
			if(s.equals("1")) {
				count++;
			}
		} {
			if(s.equals("1")) {
				count++;
			}
		} if(s.equals("1")) {
				count++;
			} s.equals("1") s.equals s "1" {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String text = sc.next();
		String[] texts = text.split("");
		int count = 0;
		for (String s : texts) {
			if(s.equals("1")) {
				count++;
			}
		}
		System.out.println(count);
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String text = sc.next();
		String[] texts = text.split("");
		int count = 0;
		for (String s : texts) {
			if(s.equals("1")) {
				count++;
			}
		}
		System.out.println(count);
		sc.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String text = sc.next();
		String[] texts = text.split("");
		int count = 0;
		for (String s : texts) {
			if(s.equals("1")) {
				count++;
			}
		}
		System.out.println(count);
		sc.close();
	}

}