#include<bits/stdc++.h>
#define maxn 100003
using namespace std;
int a[maxn],n,buc[2][maxn];
int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++)scanf("%d",a+i),buc[i&1][a[i]]++;
	int mx=0,mxcnt=0,mx2=0,mx2cnt=0;
	for(int i=1;i<=100000;i++){
		if(buc[0][i]>mxcnt)mx2=mx,mx2cnt=mxcnt,mx=i,mxcnt=buc[0][i];
		else if(buc[0][i]>mx2cnt)mx2=i,mx2cnt=buc[0][i];
	}
	int ans=maxn;
	for(int i=1;i<=n;i+=2){
		ans=min(ans,n/2-buc[1][a[i]]+(a[i]==mx?n/2-mx2cnt:n/2-mxcnt));
	}
	printf("%d\n",ans);
	return 0;
}