#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<map>

int const N = 1e5 + 5;

int a[N];
int n;

typedef std::pair<int, int> pii;

void out_pii(pii x) {
	std::cerr << x.first << ' ' << x.second << '\n';
}

void remax(pii x, pii& mx, pii& cmx) {
	if(x.second <= cmx.second) 
		return ;
	if(x.second > mx.second) 
		cmx = mx, mx = x;
	else 
		cmx = x;
}

int main() {
	std::ios::sync_with_stdio(0);
	std::cin >> n;
	for(int i = 1; i <= n; ++i)
		std::cin >> a[i];

	std::map<int, int> M1;
	for(int i = 1; i <= n; i += 2) 
		if(M1.count(a[i]) == 0)
			M1[a[i]] = 1;
		else 
			M1[a[i]]++;
	
	std::map<int, int> M2;
	for(int i = 2; i <= n; i += 2) 
		if(M2.count(a[i]) == 0)
			M2[a[i]] = 1;
		else 
			M2[a[i]]++;

	std::pair<int, int> mx1, cmx1;
	for(auto& k : M1) 
		remax(std::make_pair(k.first, k.second), mx1, cmx1);

	std::pair<int, int> mx2, cmx2;
	for(auto& k : M2) 
		remax(std::make_pair(k.first, k.second), mx2, cmx2);

	int ans = 0;
	if(mx1.first != mx2.first) {
		ans = n - mx1.second - mx2.second;
	}
	else {
		ans = std::max(cmx1.second + mx2.second, cmx2.second + mx1.second);
		ans = n - ans;
	}
	std::cout << ans << '\n';
}
