import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.next().split("");
		int i = 0;
		for(String b : a) {
			if(b.equals("1")) {
				i++;
			}
		}
		System.out.println(i);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.next().split("");
		int i = 0;
		for(String b : a) {
			if(b.equals("1")) {
				i++;
			}
		}
		System.out.println(i);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.next().split("");
		int i = 0;
		for(String b : a) {
			if(b.equals("1")) {
				i++;
			}
		}
		System.out.println(i);
	} main {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.next().split("");
		int i = 0;
		for(String b : a) {
			if(b.equals("1")) {
				i++;
			}
		}
		System.out.println(i);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] a = sc.next().split(""); a sc.next().split("") sc.next().split sc.next() sc.next sc "" int i = 0; i 0 for(String b : a) {
			if(b.equals("1")) {
				i++;
			}
		} String b a {
			if(b.equals("1")) {
				i++;
			}
		} {
			if(b.equals("1")) {
				i++;
			}
		} if(b.equals("1")) {
				i++;
			} b.equals("1") b.equals b "1" {
				i++;
			} i++ i System.out.println(i) System.out.println System.out System System.out i String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.next().split("");
		int i = 0;
		for(String b : a) {
			if(b.equals("1")) {
				i++;
			}
		}
		System.out.println(i);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.next().split("");
		int i = 0;
		for(String b : a) {
			if(b.equals("1")) {
				i++;
			}
		}
		System.out.println(i);
	}
} Main
import java.util.Scanner;

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