#K37842. Find Unique Integer

    ID: 26066 Type: Default 1000ms 256MiB

Find Unique Integer

Find Unique Integer

You are given a list of integers in which every integer appears exactly three times except for one unique integer which appears only once. Your task is to find and output this unique integer.

More formally, let the input array be \(a_1, a_2, \dots, a_n\), where each integer \(x\) (except for one) satisfies the equation:

[ \text{frequency}(x) = 3 ]

The unique integer satisfies:

[ \text{frequency}(x) = 1 ]

</p>

Explore an efficient way to identify the unique number by counting the occurrences of each integer. The input is provided as a single line of space-separated numbers, and the output should be the integer which appears only once.

inputFormat

The input consists of a single line containing space-separated integers.

For example: 2 3 2 2 3 3 4

outputFormat

Output a single integer which is unique (appearing exactly once) in the list.

## sample
2 3 2 2 3 3 4
4