import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		char[] c=s.toCharArray();
		int cnt=0;
		for(int i=0;i<c.length;i++) {
			if(Character.getNumericValue(c[i])==1)cnt++;
		}
		System.out.println(cnt);

	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		char[] c=s.toCharArray();
		int cnt=0;
		for(int i=0;i<c.length;i++) {
			if(Character.getNumericValue(c[i])==1)cnt++;
		}
		System.out.println(cnt);

	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		char[] c=s.toCharArray();
		int cnt=0;
		for(int i=0;i<c.length;i++) {
			if(Character.getNumericValue(c[i])==1)cnt++;
		}
		System.out.println(cnt);

	} main {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		char[] c=s.toCharArray();
		int cnt=0;
		for(int i=0;i<c.length;i++) {
			if(Character.getNumericValue(c[i])==1)cnt++;
		}
		System.out.println(cnt);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan scan.close() scan.close scan char[] c=s.toCharArray(); c s.toCharArray() s.toCharArray s int cnt=0; cnt 0 for(int i=0;i<c.length;i++) {
			if(Character.getNumericValue(c[i])==1)cnt++;
		} int i=0; int i=0; i 0 i<c.length i c.length c c.length i++ i++ i {
			if(Character.getNumericValue(c[i])==1)cnt++;
		} {
			if(Character.getNumericValue(c[i])==1)cnt++;
		} if(Character.getNumericValue(c[i])==1)cnt++; Character.getNumericValue(c[i])==1 Character.getNumericValue(c[i]) Character.getNumericValue Character c[i] c i 1 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) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		char[] c=s.toCharArray();
		int cnt=0;
		for(int i=0;i<c.length;i++) {
			if(Character.getNumericValue(c[i])==1)cnt++;
		}
		System.out.println(cnt);

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		char[] c=s.toCharArray();
		int cnt=0;
		for(int i=0;i<c.length;i++) {
			if(Character.getNumericValue(c[i])==1)cnt++;
		}
		System.out.println(cnt);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		scan.close();
		char[] c=s.toCharArray();
		int cnt=0;
		for(int i=0;i<c.length;i++) {
			if(Character.getNumericValue(c[i])==1)cnt++;
		}
		System.out.println(cnt);

	}

}
