import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter("");
		int s1,s2,s3;
		s1 = sc.nextInt();
		s2 = sc.nextInt();
		s3 = sc.nextInt();

		int count=0;
		if(s1 ==1 )
			count++;
		if(s2 ==1)
			count++;
		if(s3 == 1)
			count++;
		System.out.println(count);
		
	sc.close();
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter("");
		int s1,s2,s3;
		s1 = sc.nextInt();
		s2 = sc.nextInt();
		s3 = sc.nextInt();

		int count=0;
		if(s1 ==1 )
			count++;
		if(s2 ==1)
			count++;
		if(s3 == 1)
			count++;
		System.out.println(count);
		
	sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter("");
		int s1,s2,s3;
		s1 = sc.nextInt();
		s2 = sc.nextInt();
		s3 = sc.nextInt();

		int count=0;
		if(s1 ==1 )
			count++;
		if(s2 ==1)
			count++;
		if(s3 == 1)
			count++;
		System.out.println(count);
		
	sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter("");
		int s1,s2,s3;
		s1 = sc.nextInt();
		s2 = sc.nextInt();
		s3 = sc.nextInt();

		int count=0;
		if(s1 ==1 )
			count++;
		if(s2 ==1)
			count++;
		if(s3 == 1)
			count++;
		System.out.println(count);
		
	sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) sc.useDelimiter("") sc.useDelimiter sc "" int s1 s1 s2 s2 s3; s3 s1 = sc.nextInt() s1 sc.nextInt() sc.nextInt sc s2 = sc.nextInt() s2 sc.nextInt() sc.nextInt sc s3 = sc.nextInt() s3 sc.nextInt() sc.nextInt sc int count=0; count 0 if(s1 ==1 )
			count++; s1 ==1 s1 1 count++ count if(s2 ==1)
			count++; s2 ==1 s2 1 count++ count if(s3 == 1)
			count++; s3 == 1 s3 1 count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter("");
		int s1,s2,s3;
		s1 = sc.nextInt();
		s2 = sc.nextInt();
		s3 = sc.nextInt();

		int count=0;
		if(s1 ==1 )
			count++;
		if(s2 ==1)
			count++;
		if(s3 == 1)
			count++;
		System.out.println(count);
		
	sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter("");
		int s1,s2,s3;
		s1 = sc.nextInt();
		s2 = sc.nextInt();
		s3 = sc.nextInt();

		int count=0;
		if(s1 ==1 )
			count++;
		if(s2 ==1)
			count++;
		if(s3 == 1)
			count++;
		System.out.println(count);
		
	sc.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter("");
		int s1,s2,s3;
		s1 = sc.nextInt();
		s2 = sc.nextInt();
		s3 = sc.nextInt();

		int count=0;
		if(s1 ==1 )
			count++;
		if(s2 ==1)
			count++;
		if(s3 == 1)
			count++;
		System.out.println(count);
		
	sc.close();
	}

}
