import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] a = new int[9]; for (int i = 0; i < a.length ; i++) { a[i] = sc.nextInt(); } for(int i = 0 ; i < 9 ; i++) { if(a[i] != i + 1) { System.out.println(i + 1); return; } else { if(i == 8) { System.out.println(10); } } } } }