CS1083


Submit solution

Points: 14
Time limit: 1.0s
Memory limit: 512M

Problem type

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. (1≤n≤2*10^5)\)

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

Output

  • Print the missing number.

Sample Input

5
2 3 1 5

Sample Output

4

Comments

There are no comments at the moment.