#abc295c. [abc295_c]Socks
[abc295_c]Socks
Problem Statement
You have socks. The color of the -th sock is .
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.
Constraints
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Print an integer representing the answer.
Sample Input 1
6
4 1 7 4 1 4
Sample Output 1
2
You can do the operation twice as follows.
- Choose two socks with the color and pair them.
- Choose two socks with the color and pair them.
Then, you will be left with one sock with the color and another with the color , so you can no longer do the operation. There is no way to do the operation three or more times, so you should print .
Sample Input 2
1
158260522
Sample Output 2
0
Sample Input 3
10
295 2 29 295 29 2 29 295 2 29
Sample Output 3
4