
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			char[] array = scanner.next().toCharArray();
			Map<Character, Integer> map = new HashMap<>();
			map.put('0',0);
			map.put('1',0);

			for (char c : array) {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			}
			System.out.println(map.get('1'));
		}
	}
} import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			char[] array = scanner.next().toCharArray();
			Map<Character, Integer> map = new HashMap<>();
			map.put('0',0);
			map.put('1',0);

			for (char c : array) {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			}
			System.out.println(map.get('1'));
		}
	}
} Main public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			char[] array = scanner.next().toCharArray();
			Map<Character, Integer> map = new HashMap<>();
			map.put('0',0);
			map.put('1',0);

			for (char c : array) {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			}
			System.out.println(map.get('1'));
		}
	} main {
		try (Scanner scanner = new Scanner(System.in)) {
			char[] array = scanner.next().toCharArray();
			Map<Character, Integer> map = new HashMap<>();
			map.put('0',0);
			map.put('1',0);

			for (char c : array) {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			}
			System.out.println(map.get('1'));
		}
	} try (Scanner scanner = new Scanner(System.in)) {
			char[] array = scanner.next().toCharArray();
			Map<Character, Integer> map = new HashMap<>();
			map.put('0',0);
			map.put('1',0);

			for (char c : array) {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			}
			System.out.println(map.get('1'));
		} {
			char[] array = scanner.next().toCharArray();
			Map<Character, Integer> map = new HashMap<>();
			map.put('0',0);
			map.put('1',0);

			for (char c : array) {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			}
			System.out.println(map.get('1'));
		} Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) char[] array = scanner.next().toCharArray(); array scanner.next().toCharArray() scanner.next().toCharArray scanner.next() scanner.next scanner Map<Character, Integer> map = new HashMap<>(); map new HashMap<>() map.put('0',0) map.put map '0' 0 map.put('1',0) map.put map '1' 0 for (char c : array) {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			} char c array {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			} {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			} if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				} map.containsKey(c) map.containsKey map c {
					map.put(c, map.get(c)+ 1);
				} map.put(c, map.get(c)+ 1) map.put map c map.get(c)+ 1 map.get(c) map.get map c 1 System.out.println(map.get('1')) System.out.println System.out System System.out map.get('1') map.get map '1' String[] args args public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			char[] array = scanner.next().toCharArray();
			Map<Character, Integer> map = new HashMap<>();
			map.put('0',0);
			map.put('1',0);

			for (char c : array) {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			}
			System.out.println(map.get('1'));
		}
	}
} public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			char[] array = scanner.next().toCharArray();
			Map<Character, Integer> map = new HashMap<>();
			map.put('0',0);
			map.put('1',0);

			for (char c : array) {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			}
			System.out.println(map.get('1'));
		}
	}
} Main

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			char[] array = scanner.next().toCharArray();
			Map<Character, Integer> map = new HashMap<>();
			map.put('0',0);
			map.put('1',0);

			for (char c : array) {
				if (map.containsKey(c)) {
					map.put(c, map.get(c)+ 1);
				}
			}
			System.out.println(map.get('1'));
		}
	}
}
