#C9346. Smallest Missing Prime

    ID: 53429 Type: Default 1000ms 256MiB

Smallest Missing Prime

Smallest Missing Prime

Given a list of positive integers, your task is to find the smallest prime number that does not appear in the list.

A prime number is a natural number greater than 1 that has no divisors other than 1 and itself. In mathematical terms, a number \(p\) is prime if \(p > 1\) and its only divisors are \(1\) and \(p\). For example, the primes less than 10 are 2, 3, 5, and 7.

You need to implement a program that reads input from standard input (stdin) and writes the result to standard output (stdout).

inputFormat

The first line contains a single integer \(n\) representing the number of elements in the list. The second line contains \(n\) space-separated positive integers.

outputFormat

Output a single integer representing the smallest prime number that is missing from the given list.

## sample
5
3 7 5 11 2
13

</p>