import java.util.Scanner;
public class Main {

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

	}

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

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

	}

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

	} main {
		String input;
		int cnt = 0;
		Scanner sc = new Scanner(System.in);
		input = sc.next();
		String[] strArray = input.split("");
		for(String s : strArray) {
			if(s.equals("1")) {
				cnt++;
			}
		}
		System.out.println(cnt);

	} String input; input int cnt = 0; cnt 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) input = sc.next() input sc.next() sc.next sc String[] strArray = input.split(""); strArray input.split("") input.split input "" for(String s : strArray) {
			if(s.equals("1")) {
				cnt++;
			}
		} String s strArray {
			if(s.equals("1")) {
				cnt++;
			}
		} {
			if(s.equals("1")) {
				cnt++;
			}
		} if(s.equals("1")) {
				cnt++;
			} s.equals("1") s.equals s "1" {
				cnt++;
			} cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {

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

	}

} public class Main {

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

	}

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

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

	}

}