#K56157. Missing Employee ID

    ID: 30136 Type: Default 1000ms 256MiB

Missing Employee ID

Missing Employee ID

Given the total number of employees n and a list of n-1 employee IDs, determine the missing employee ID. This problem can be solved using the formula for the sum of the first n natural numbers:

$$S = \frac{n(n+1)}{2}$$

Subtract the sum of the given IDs from S to obtain the missing ID.

inputFormat

The input is provided via standard input (stdin) in two lines. The first line contains an integer n representing the total number of employees. The second line contains n-1 space-separated integers representing the employee IDs.

outputFormat

Output a single integer via standard output (stdout) which is the missing employee ID.## sample

6
3 1 4 5 6
2