9268: ABC295 —— C - Socks
[Creator : ]
Description
### Problem Statement
You have $N$ socks. The color of the $i$-th sock is $A_i$.
You want to perform the following operation as many times as possible. How many times can it be performed at most?
- Choose two same-colored socks that are not paired yet, and pair them.
You have $N$ socks. The color of the $i$-th sock is $A_i$.
You want to perform the following operation as many times as possible. How many times can it be performed at most?
- Choose two same-colored socks that are not paired yet, and pair them.
Input
### Input
The input is given from Standard Input in the following format:
```
$N$
$A_1$ $A_2$ $\dots$ $A_N$
```
The input is given from Standard Input in the following format:
```
$N$
$A_1$ $A_2$ $\dots$ $A_N$
```
Output
### Output
Print an integer representing the answer.
Print an integer representing the answer.
Constraints
### Constraints
- $1\leq N \leq 5\times 10^5$
- $1\leq A_i \leq 10^9$
- All values in the input are integers.
- $1\leq N \leq 5\times 10^5$
- $1\leq A_i \leq 10^9$
- All values in the input are integers.
Sample 1 Input
6
4 1 7 4 1 4
Sample 1 Output
2
You can do the operation twice as follows.
- Choose two socks with the color 1 and pair them.
- Choose two socks with the color 4 and pair them.
Sample 2 Input
1
158260522
Sample 2 Output
0
Sample 3 Input
10
295 2 29 295 29 2 29 295 2 29
Sample 3 Output
4