#arc103a. [arc103_a]/\/\/\/
[arc103_a]/\/\/\/
Problem Statement
A sequence is said to be /\/\/\/ when the following conditions are satisfied:
- For each , .
- Exactly two different numbers appear in the sequence.
You are given a sequence whose length is even. We would like to make this sequence /\/\/\/ by replacing some of its elements. Find the minimum number of elements that needs to be replaced.
Constraints
- is even.
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print the minimum number of elements that needs to be replaced.
Sample Input 1
4
3 1 3 2
Sample Output 1
1
The sequence is not /\/\/\/, but we can make it /\/\/\/ by replacing one of its elements: for example, replace the fourth element to make it .
Sample Input 2
6
105 119 105 119 105 119
Sample Output 2
0
The sequence is /\/\/\/.
Sample Input 3
4
1 1 1 1
Sample Output 3
2
The elements of the sequence are all the same, so it is not /\/\/\/.