#include<bits/stdc++.h>
using namespace std;
#define MP make_pair
const int Maxn=1e5+7;
int n;
pair <int,int> t1[Maxn];
pair <int,int> t0[Maxn];
int main(){
	cin>>n;
	for(int i=0,a;i<n;i++){
		cin>>a;
		if(i%2==0)
			t0[a]=MP(t0[a].first-1,a);
		if(i%2==1)
			t1[a]=MP(t1[a].first-1,a);
	}
	sort(t0,t0+Maxn);
	sort(t1,t1+Maxn);
	if(t1[0].second!=t0[0].second){
		cout<<n/2+t1[0].first+n/2+t0[0].first;
	}
	else{
		int ans=min(n/2+t1[0].first+n/2+t0[1].first,n/2+t1[1].first+n/2+t0[0].first);
			cout<<ans;
	}
}
