import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input=scanner.nextLine();
		int cnt=0;
		for(int i=0;i<3;i++){
			if(input.charAt(i)=='1'){
				cnt++;
			}
		}
		System.out.println(cnt);
		scanner.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input=scanner.nextLine();
		int cnt=0;
		for(int i=0;i<3;i++){
			if(input.charAt(i)=='1'){
				cnt++;
			}
		}
		System.out.println(cnt);
		scanner.close();
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input=scanner.nextLine();
		int cnt=0;
		for(int i=0;i<3;i++){
			if(input.charAt(i)=='1'){
				cnt++;
			}
		}
		System.out.println(cnt);
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		String input=scanner.nextLine();
		int cnt=0;
		for(int i=0;i<3;i++){
			if(input.charAt(i)=='1'){
				cnt++;
			}
		}
		System.out.println(cnt);
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input=scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner int cnt=0; cnt 0 for(int i=0;i<3;i++){
			if(input.charAt(i)=='1'){
				cnt++;
			}
		} int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
			if(input.charAt(i)=='1'){
				cnt++;
			}
		} {
			if(input.charAt(i)=='1'){
				cnt++;
			}
		} if(input.charAt(i)=='1'){
				cnt++;
			} input.charAt(i)=='1' input.charAt(i) input.charAt input i '1' {
				cnt++;
			} cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input=scanner.nextLine();
		int cnt=0;
		for(int i=0;i<3;i++){
			if(input.charAt(i)=='1'){
				cnt++;
			}
		}
		System.out.println(cnt);
		scanner.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input=scanner.nextLine();
		int cnt=0;
		for(int i=0;i<3;i++){
			if(input.charAt(i)=='1'){
				cnt++;
			}
		}
		System.out.println(cnt);
		scanner.close();
	}
} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input=scanner.nextLine();
		int cnt=0;
		for(int i=0;i<3;i++){
			if(input.charAt(i)=='1'){
				cnt++;
			}
		}
		System.out.println(cnt);
		scanner.close();
	}
}