import java.util.Scanner; public class suuji { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int result = 0; for(int i=1; i<10; i++){ int tmp = sc.nextInt(); if(tmp != i){ result = i; break; } } System.out.println(result); } }