Skip to content
C

Find the Missing Number

Easyjavapythonccppjavascript

An array contains N-1 distinct numbers taken from 1 to N, with exactly one number missing. Find the missing number.

Input Format

The first line contains an integer N. The second line contains N-1 space-separated distinct integers, each between 1 and N.

Output Format

Print the missing number.

Input (stdin)

Output

Run your code to see output here...