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