import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int ans = 1;
		int a = sc.nextInt();
		if (a == 0 ) System.out.println(ans);
		int b = sc.nextInt();
		ans++;
		if (b == 0 ) System.out.println(ans);
		ans++;
		int c = sc.nextInt();
		if (c == 0 ) System.out.println(ans);
		ans++;
		int d = sc.nextInt();
		if (d == 0 ) System.out.println(ans);
		ans++;
		int e = sc.nextInt();
		if (e == 0 ) System.out.println(ans);


		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int ans = 1;
		int a = sc.nextInt();
		if (a == 0 ) System.out.println(ans);
		int b = sc.nextInt();
		ans++;
		if (b == 0 ) System.out.println(ans);
		ans++;
		int c = sc.nextInt();
		if (c == 0 ) System.out.println(ans);
		ans++;
		int d = sc.nextInt();
		if (d == 0 ) System.out.println(ans);
		ans++;
		int e = sc.nextInt();
		if (e == 0 ) System.out.println(ans);


		sc.close();
	}
} Main public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int ans = 1;
		int a = sc.nextInt();
		if (a == 0 ) System.out.println(ans);
		int b = sc.nextInt();
		ans++;
		if (b == 0 ) System.out.println(ans);
		ans++;
		int c = sc.nextInt();
		if (c == 0 ) System.out.println(ans);
		ans++;
		int d = sc.nextInt();
		if (d == 0 ) System.out.println(ans);
		ans++;
		int e = sc.nextInt();
		if (e == 0 ) System.out.println(ans);


		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int ans = 1;
		int a = sc.nextInt();
		if (a == 0 ) System.out.println(ans);
		int b = sc.nextInt();
		ans++;
		if (b == 0 ) System.out.println(ans);
		ans++;
		int c = sc.nextInt();
		if (c == 0 ) System.out.println(ans);
		ans++;
		int d = sc.nextInt();
		if (d == 0 ) System.out.println(ans);
		ans++;
		int e = sc.nextInt();
		if (e == 0 ) System.out.println(ans);


		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int ans = 1; ans 1 int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc if (a == 0 ) System.out.println(ans); a == 0 a 0 System.out.println(ans) System.out.println System.out System System.out ans int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc ans++ ans if (b == 0 ) System.out.println(ans); b == 0 b 0 System.out.println(ans) System.out.println System.out System System.out ans ans++ ans int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc if (c == 0 ) System.out.println(ans); c == 0 c 0 System.out.println(ans) System.out.println System.out System System.out ans ans++ ans int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc if (d == 0 ) System.out.println(ans); d == 0 d 0 System.out.println(ans) System.out.println System.out System System.out ans ans++ ans int e = sc.nextInt(); e sc.nextInt() sc.nextInt sc if (e == 0 ) System.out.println(ans); e == 0 e 0 System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int ans = 1;
		int a = sc.nextInt();
		if (a == 0 ) System.out.println(ans);
		int b = sc.nextInt();
		ans++;
		if (b == 0 ) System.out.println(ans);
		ans++;
		int c = sc.nextInt();
		if (c == 0 ) System.out.println(ans);
		ans++;
		int d = sc.nextInt();
		if (d == 0 ) System.out.println(ans);
		ans++;
		int e = sc.nextInt();
		if (e == 0 ) System.out.println(ans);


		sc.close();
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int ans = 1;
		int a = sc.nextInt();
		if (a == 0 ) System.out.println(ans);
		int b = sc.nextInt();
		ans++;
		if (b == 0 ) System.out.println(ans);
		ans++;
		int c = sc.nextInt();
		if (c == 0 ) System.out.println(ans);
		ans++;
		int d = sc.nextInt();
		if (d == 0 ) System.out.println(ans);
		ans++;
		int e = sc.nextInt();
		if (e == 0 ) System.out.println(ans);


		sc.close();
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int ans = 1;
		int a = sc.nextInt();
		if (a == 0 ) System.out.println(ans);
		int b = sc.nextInt();
		ans++;
		if (b == 0 ) System.out.println(ans);
		ans++;
		int c = sc.nextInt();
		if (c == 0 ) System.out.println(ans);
		ans++;
		int d = sc.nextInt();
		if (d == 0 ) System.out.println(ans);
		ans++;
		int e = sc.nextInt();
		if (e == 0 ) System.out.println(ans);


		sc.close();
	}
}
