import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		
		while (a > 0) {
			list.add(a%10);
			a /= 10;
		}
		
		int result = 0;
		for (int l : list) {
			if (l == 1) {
				result += l;
			}
		}
		
		System.out.println(result);
		
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		
		while (a > 0) {
			list.add(a%10);
			a /= 10;
		}
		
		int result = 0;
		for (int l : list) {
			if (l == 1) {
				result += l;
			}
		}
		
		System.out.println(result);
		
	}
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		
		while (a > 0) {
			list.add(a%10);
			a /= 10;
		}
		
		int result = 0;
		for (int l : list) {
			if (l == 1) {
				result += l;
			}
		}
		
		System.out.println(result);
		
	} main {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		
		while (a > 0) {
			list.add(a%10);
			a /= 10;
		}
		
		int result = 0;
		for (int l : list) {
			if (l == 1) {
				result += l;
			}
		}
		
		System.out.println(result);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc List<Integer> list = new ArrayList<>(); list new ArrayList<>() while (a > 0) {
			list.add(a%10);
			a /= 10;
		} a > 0 a 0 {
			list.add(a%10);
			a /= 10;
		} list.add(a%10) list.add list a%10 a 10 a /= 10 a 10 int result = 0; result 0 for (int l : list) {
			if (l == 1) {
				result += l;
			}
		} int l list {
			if (l == 1) {
				result += l;
			}
		} {
			if (l == 1) {
				result += l;
			}
		} if (l == 1) {
				result += l;
			} l == 1 l 1 {
				result += l;
			} result += l result l System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		
		while (a > 0) {
			list.add(a%10);
			a /= 10;
		}
		
		int result = 0;
		for (int l : list) {
			if (l == 1) {
				result += l;
			}
		}
		
		System.out.println(result);
		
	}
} public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		
		while (a > 0) {
			list.add(a%10);
			a /= 10;
		}
		
		int result = 0;
		for (int l : list) {
			if (l == 1) {
				result += l;
			}
		}
		
		System.out.println(result);
		
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		
		List<Integer> list = new ArrayList<>();
		
		while (a > 0) {
			list.add(a%10);
			a /= 10;
		}
		
		int result = 0;
		for (int l : list) {
			if (l == 1) {
				result += l;
			}
		}
		
		System.out.println(result);
		
	}
}