2023 Azerbaijan, Semifinals, February 18, 10 - 11 classes
In the free time, Fidan and Fuad play at home. This time they came up with the next game:
- Fuad takes a blank sheet of paper.
- Fidan says one number. If this number is written on paper, Fuad erases this number from the paper. Otherwise, if it is not written, Fuad writes the number on paper. This process is repeated n times.
- At the end, Fidan must determine how many numbers are written on paper.
an are given in the order she said them. At the end, help Fidan find how many numbers are written on the paper.
The first line contains one integer n (1 ≤ n ≤
105). The second line contains n integers
an (1 ≤
Print how many numbers were written on the paper at the end of the game.
Let's consider the first example. The game goes like this:
- There is no 5 on the paper, Fuad writes 5 on the paper.
- 7 is not written on paper, Fuad writes 7 on paper.
- There is no 4 on the paper, Fuad writes 4 on the paper.
- 5 is written on the paper, Fuad erases 5 from the paper.
At the end of the game, 2 numbers are left on the paper.
Input example #1
4 5 7 4 5
Output example #1
Input example #2
6 1 2 3 2 3 1
Output example #2