#K11516. Missing Picture Identifier
Missing Picture Identifier
Missing Picture Identifier
You are given a total number of pictures n that were originally labeled from 1 to n. However, one picture identifier is missing. You are provided with the list of the remaining n-1 identifiers (in any order). Your task is to determine the missing picture identifier.
Note that the sum of the first n natural numbers is given by the formula: \( \frac{n(n+1)}{2} \).
Example:
Input: 5 1 2 4 5</p>Output: 3
inputFormat
The first line of input contains an integer n (the total number of pictures). The second line contains n-1 space-separated integers representing the identifiers of the remaining pictures.
outputFormat
Output a single integer – the missing picture identifier.
## sample5
1 2 4 5
3