Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/massiv-unikal-elementlar

Number of unique elements

Easy 1000 ms 128 MB 28%
Share

A positive integer $n$ and an array of $n$ integers are given. Determine the number of elements that occur in the array exactly once (have no other copy).

The number of non-repeating elements that occur in the array exactly once

Input

The first line contains a positive integer $n$. The second line contains $n$ integers separated by spaces.

Output

One integer — the number of unique elements.

Note

$1 \le n \le 1000$
$-10^{9} \le a_{i} \le 10^{9}$

Examples

Input #1
7
5 2 8 2 9 5 7
Output #1
3
Input #2
4
4 4 4 4
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.