import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		char[] ac = a.toCharArray();
		int count = 0;
		if (ac[0] == '1') count++;
		if (ac[1] == '1') count++;
		if (ac[2] == '1') count++;
		System.out.println(count);
	}	
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		char[] ac = a.toCharArray();
		int count = 0;
		if (ac[0] == '1') count++;
		if (ac[1] == '1') count++;
		if (ac[2] == '1') count++;
		System.out.println(count);
	}	
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		char[] ac = a.toCharArray();
		int count = 0;
		if (ac[0] == '1') count++;
		if (ac[1] == '1') count++;
		if (ac[2] == '1') count++;
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		char[] ac = a.toCharArray();
		int count = 0;
		if (ac[0] == '1') count++;
		if (ac[1] == '1') count++;
		if (ac[2] == '1') count++;
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc char[] ac = a.toCharArray(); ac a.toCharArray() a.toCharArray a int count = 0; count 0 if (ac[0] == '1') count++; ac[0] == '1' ac[0] ac 0 '1' count++ count if (ac[1] == '1') count++; ac[1] == '1' ac[1] ac 1 '1' count++ count if (ac[2] == '1') count++; ac[2] == '1' ac[2] ac 2 '1' 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 a = sc.next();
		char[] ac = a.toCharArray();
		int count = 0;
		if (ac[0] == '1') count++;
		if (ac[1] == '1') count++;
		if (ac[2] == '1') count++;
		System.out.println(count);
	}	
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		char[] ac = a.toCharArray();
		int count = 0;
		if (ac[0] == '1') count++;
		if (ac[1] == '1') count++;
		if (ac[2] == '1') count++;
		System.out.println(count);
	}	
} Main
import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		char[] ac = a.toCharArray();
		int count = 0;
		if (ac[0] == '1') count++;
		if (ac[1] == '1') count++;
		if (ac[2] == '1') count++;
		System.out.println(count);
	}	
}