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