LearnPy Hub
← Arena
IntermediateRating 1100

Find the Duplicate

The list has n + 1 numbers, each from 1 to n, and exactly one value repeats (maybe several times). Print it.

Input

n, then n + 1 integers.

Output

One integer.

Sample 1

Input
4
1 3 4 2 2
Output
2

Sample 2

Input
4
3 1 3 4 2
Output
3
solution.py
Output appears here
Find the Duplicate · Python Arena problem · LearnPy Hub