#C5528. Find the Missing Number
Find the Missing Number
Find the Missing Number
Given an array containing n-1 unique integers in the range 1 to n, find the missing number. The total sum of numbers from 1 to n can be computed using the formula $$\frac{n(n+1)}{2}$$. The missing number is simply the difference between the expected total sum and the actual sum of the array. This problem requires you to implement an efficient solution that reads input from stdin and writes the result to stdout.
inputFormat
The input is read from stdin. The first line contains an integer m representing the number of elements provided in the array. The second line contains m space-separated integers. Note that the complete range is from 1 to n where n = m + 1.
outputFormat
Output a single integer to stdout which is the missing number in the range from 1 to n.
## sample5
1 2 4 5 6
3
</p>