import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scan = new Scanner(System.in)) { int n = scan.nextInt(); int list[] = new int[n]; for(int i=0; i=0; i--) { if(list[i] == target) { count++; target--; } } System.out.println(n-count); } } }