#K92717. Find the Odd Occurrence

    ID: 38260 Type: Default 1000ms 256MiB

Find the Odd Occurrence

Find the Odd Occurrence

You are given a list of integers in which exactly one integer appears an odd number of times. All other integers appear an even number of times. Your task is to find and output the integer that appears an odd number of times.

More formally, for an integer x in the list, if the frequency of x satisfies \[ f(x) \mod 2 \neq 0, \] then x is the number you should output. It is guaranteed that there is exactly one such integer in the list.

Example:

Input:
7
1 1 2 2 3 3 3

Output: 3

</p>

inputFormat

The input is given via stdin and consists of two lines:

  • The first line contains a single integer n, which is the size of the list.
  • The second line contains n space-separated integers.

It is guaranteed that exactly one integer occurs an odd number of times.

outputFormat

Output a single integer to stdout which is the number that occurs an odd number of times.

## sample
7
1 1 2 2 3 3 3
3