An array holds n distinct numbers taken from the range 0..n, so exactly one number in that range is missing. Find it.
0..n
Input: one line of space-separated integers. Output: the missing number.
Your program reads from stdin and prints to stdout.
Example 1
Input: 3 0 1
Output: 2
Hints