import java.util.*;

public class Main {
		public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numArray = num.split("");
		int count = 0;
		for(int i = 0;i<numArray.length;i++) {
			int[] numInt = new int[numArray.length];
			numInt[i] = Integer.parseInt(numArray[i]);

			if(numInt[i] == 1) {
				count++;
			}
		}
		System.out.println(count);
	}

} import java.util.*; util.* java public class Main {
		public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numArray = num.split("");
		int count = 0;
		for(int i = 0;i<numArray.length;i++) {
			int[] numInt = new int[numArray.length];
			numInt[i] = Integer.parseInt(numArray[i]);

			if(numInt[i] == 1) {
				count++;
			}
		}
		System.out.println(count);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numArray = num.split("");
		int count = 0;
		for(int i = 0;i<numArray.length;i++) {
			int[] numInt = new int[numArray.length];
			numInt[i] = Integer.parseInt(numArray[i]);

			if(numInt[i] == 1) {
				count++;
			}
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numArray = num.split("");
		int count = 0;
		for(int i = 0;i<numArray.length;i++) {
			int[] numInt = new int[numArray.length];
			numInt[i] = Integer.parseInt(numArray[i]);

			if(numInt[i] == 1) {
				count++;
			}
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String num = sc.nextLine(); num sc.nextLine() sc.nextLine sc String[] numArray = num.split(""); numArray num.split("") num.split num "" int count = 0; count 0 for(int i = 0;i<numArray.length;i++) {
			int[] numInt = new int[numArray.length];
			numInt[i] = Integer.parseInt(numArray[i]);

			if(numInt[i] == 1) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i<numArray.length i numArray.length numArray numArray.length i++ i++ i {
			int[] numInt = new int[numArray.length];
			numInt[i] = Integer.parseInt(numArray[i]);

			if(numInt[i] == 1) {
				count++;
			}
		} {
			int[] numInt = new int[numArray.length];
			numInt[i] = Integer.parseInt(numArray[i]);

			if(numInt[i] == 1) {
				count++;
			}
		} int[] numInt = new int[numArray.length]; numInt new int[numArray.length] numArray.length numArray numArray.length numInt[i] = Integer.parseInt(numArray[i]) numInt[i] numInt i Integer.parseInt(numArray[i]) Integer.parseInt Integer numArray[i] numArray i if(numInt[i] == 1) {
				count++;
			} numInt[i] == 1 numInt[i] numInt i 1 {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
		public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numArray = num.split("");
		int count = 0;
		for(int i = 0;i<numArray.length;i++) {
			int[] numInt = new int[numArray.length];
			numInt[i] = Integer.parseInt(numArray[i]);

			if(numInt[i] == 1) {
				count++;
			}
		}
		System.out.println(count);
	}

} public class Main {
		public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numArray = num.split("");
		int count = 0;
		for(int i = 0;i<numArray.length;i++) {
			int[] numInt = new int[numArray.length];
			numInt[i] = Integer.parseInt(numArray[i]);

			if(numInt[i] == 1) {
				count++;
			}
		}
		System.out.println(count);
	}

} Main
import java.util.*;

public class Main {
		public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String num = sc.nextLine();
		String[] numArray = num.split("");
		int count = 0;
		for(int i = 0;i<numArray.length;i++) {
			int[] numInt = new int[numArray.length];
			numInt[i] = Integer.parseInt(numArray[i]);

			if(numInt[i] == 1) {
				count++;
			}
		}
		System.out.println(count);
	}

}