import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); for(int i=1;i<=9;i++){ int input = sc.nextInt(); if(input==i){ if(i==9){ System.out.println(10); } continue; }else if(input==9){ System.out.println(i); break; }else{ System.out.println(i); break; } } sc.close(); }// mainmethod } // class