HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


Missing Number

Section problems

• Shopping
• Corridor
• D. Love-Hate
• Ferris Wheel
• Repetitions
• Weird Algorithm
• Bit Strings
• Distinct Numbers
• Missing Number
• Increasing Array
• Coin Piles
• Josephus Queries
• Apartments
• Apple Division
• Creating Strings
• Trailing Zeros
• Number Spiral

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Difficulty Alpha


You are given all numbers between 1,2,…,n except one. Your task is to find the missing number.

Input

The first input line contains an integer n.

The second line contains n−1 numbers. Each number is distinct and between 1 and n (inclusive).

Output

Print the missing number.

Constraints
2≤n≤2⋅105

Example
Input:
5
2 3 1 5

Output:
4

Для отправки решений необходимо выполнить вход.

www.contester.ru