#include <iostream>
#include <cstring>
#include <vector>
#include <map>
using namespace std;
int n;
const int maxn=1e5+5;
const int INF=1e9;
map<int,int>p1,p2;
int m1,m2,m3,m4;
int a1,a2,a3,a4;
int a[maxn];
int main(){
	cin >> n;
	for (int i=1;i<=n;i++){
		cin >> a[i];
		if (i&1)
			p1[a[i]]++;
		else
			p2[a[i]]++;
	}
	m1=m2=0;
	for (auto i:p1){
		if (i.second>m2){
			m2=i.second;
			a2=i.first;
		}
		if (m2>m1){
			swap(m1,m2);
			swap(a1,a2);
		}
	}
	m3=m4=0;
	for (auto i:p2){
		if (i.second>m4){
			m4=i.second;
			a4=i.first;
		}
		if (m4>m3){
			swap(m3,m4);
			swap(a3,a4);
		}
	}
	int ans;
	if (a1==a3){
		ans=max(m2+m3,m1+m4);
	}else{
		ans=m1+m3;
	}
	cout << n-ans;
}




