Find the Number Appearing Once
Every number in an array appears twice except one; find that single number without extra space.
Input format
The first line contains N (odd). The second line contains N integers where every value appears exactly twice except one.
Output format
Print the value that appears only once.
Constraints
- Values fit in a 64-bit signed integer
- Trailing whitespace and a trailing newline are ignored by the judge
Read from stdin, write to stdout. Sample cases below show the exact format.
Sample cases
Example 1
Input
5
4 1 2 1 2Expected output
4Example 2
Input
1
99Expected output
99