#include <bits/stdc++.h>
using namespace std;
 
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int n; cin >> n;
	map<int, int> mp1, mp2;
	for(int i = 0; i < n; i++) {
		int v; cin >> v;
		(i % 2 == 0? mp1[v]++ : mp2[v]++);
	}
	int a = 0, b = 0, c = 0, d = 0;
	int mx1 = 0, mx2 = 0;
	for(int i = 0; i <= 100005; i++) {
		if(mp1[i] >= a) {
			b = a;
			a = mp1[i];
			mx1 = i;
		}
	}
	for(int i = 100005; i >= 0; i--){
		if(mp2[i] >= c) {
			d = c;
			c = mp2[i];
			mx2 = i;
		}
	}
	if(mx1 != mx2) cout << n - a - c << endl;
	else {
		cout << min(n - a - d, n - b - c) << endl;
	}
	return 0;                                              
}
	
