#include<cstdio>
#include<algorithm> 
using namespace std;
int q,k0,k1,n,ans;
int a[2][100010],b0[100010],b1[100010];
int cmp0(int x,int y) {
	return a[0][x]>a[0][y];
}
int cmp1(int x,int y) {
	return a[1][x]>a[1][y];
}
int main() {
	scanf("%d",&n);
	q=-2019201920;
	for (int i=1; i<=n; i++) {
		int m;
		scanf("%d",&m);
		a[i%2][m]=a[i%2][m]+1;
		if (m>q) q=m;
	}	
	for (int i=1; i<=q; i++) if (a[1][i]!=0) k1=k1+1,b1[k1]=i;
	for (int i=1; i<=q; i++) if (a[0][i]!=0) k0=k0+1,b0[k0]=i;
	sort(b0+1,b0+1+k0,cmp0);
	sort(b1+1,b1+1+k1,cmp1);
	k0=k0+1;b0[k0]=0;k1=k1+1;b1[k1]=0;ans=2019201920;
	for (int i=1; i<=k0; i++)
		for (int j=1; j<=k1; j++)
			if (b0[i]!=b1[j]) {
				ans=min(ans,n/2-a[0][b0[i]]+n/2-a[1][b1[j]]);
				break;				
			}
	for (int i=1; i<=k1; i++)
		for (int j=1; j<=k0; j++)
			if (b1[i]!=b0[j]) {
				ans=min(ans,n/2-a[1][b1[i]]+n/2-a[0][b0[j]]);
				break;				
			}
	printf("%d",ans);
	return 0;
} 