#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main() {
	int n, omax = 0, emax = 0, om, em;
	vector<int> o(100001, 0);
	vector<int> e(100001, 0);
	cin >> n;

	for (int i = 0; i < n / 2; i++) {
		int a, b;
		cin >> a >> b;
		o[b]++; e[a]++;
		if (o[b] > omax) {
			omax = o[b]; om = b;
		}
		if (e[a] > emax) {
			emax = e[a]; em = a;
		}
	}

	sort(o.rbegin(), o.rend());
	sort(e.rbegin(), e.rend());

	if (om != em) {
		cout << n - o[0] - e[0] << endl;
	}
	else {
		cout << min(n - o[0] - e[1], n - o[1] - e[0]) << endl;
	}
	return 0;
}
