import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader keyIn = new BufferedReader(new InputStreamReader(System.in));
		String s = keyIn.readLine();
		String[] array = s.split("");
		int count = 0;
		if(array[0].equals("1")) count++;
		if(array[1].equals("1")) count++;
		if(array[2].equals("1")) count++;
		
		System.out.println(count);

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader keyIn = new BufferedReader(new InputStreamReader(System.in));
		String s = keyIn.readLine();
		String[] array = s.split("");
		int count = 0;
		if(array[0].equals("1")) count++;
		if(array[1].equals("1")) count++;
		if(array[2].equals("1")) count++;
		
		System.out.println(count);

	}

} Main public static void main(String[] args) throws Exception{
		BufferedReader keyIn = new BufferedReader(new InputStreamReader(System.in));
		String s = keyIn.readLine();
		String[] array = s.split("");
		int count = 0;
		if(array[0].equals("1")) count++;
		if(array[1].equals("1")) count++;
		if(array[2].equals("1")) count++;
		
		System.out.println(count);

	} main {
		BufferedReader keyIn = new BufferedReader(new InputStreamReader(System.in));
		String s = keyIn.readLine();
		String[] array = s.split("");
		int count = 0;
		if(array[0].equals("1")) count++;
		if(array[1].equals("1")) count++;
		if(array[2].equals("1")) count++;
		
		System.out.println(count);

	} BufferedReader keyIn = new BufferedReader(new InputStreamReader(System.in)); keyIn new BufferedReader(new InputStreamReader(System.in)) String s = keyIn.readLine(); s keyIn.readLine() keyIn.readLine keyIn String[] array = s.split(""); array s.split("") s.split s "" int count = 0; count 0 if(array[0].equals("1")) count++; array[0].equals("1") array[0].equals array[0] array 0 "1" count++ count if(array[1].equals("1")) count++; array[1].equals("1") array[1].equals array[1] array 1 "1" count++ count if(array[2].equals("1")) count++; array[2].equals("1") array[2].equals array[2] array 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) throws Exception{
		BufferedReader keyIn = new BufferedReader(new InputStreamReader(System.in));
		String s = keyIn.readLine();
		String[] array = s.split("");
		int count = 0;
		if(array[0].equals("1")) count++;
		if(array[1].equals("1")) count++;
		if(array[2].equals("1")) count++;
		
		System.out.println(count);

	}

} public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader keyIn = new BufferedReader(new InputStreamReader(System.in));
		String s = keyIn.readLine();
		String[] array = s.split("");
		int count = 0;
		if(array[0].equals("1")) count++;
		if(array[1].equals("1")) count++;
		if(array[2].equals("1")) count++;
		
		System.out.println(count);

	}

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader keyIn = new BufferedReader(new InputStreamReader(System.in));
		String s = keyIn.readLine();
		String[] array = s.split("");
		int count = 0;
		if(array[0].equals("1")) count++;
		if(array[1].equals("1")) count++;
		if(array[2].equals("1")) count++;
		
		System.out.println(count);

	}

}