#include<bits/stdc++.h>
using namespace std;
typedef long long ll; 

int main(){
	int n,a[100005]={},b[100005]={};
	cin>>n;
	for(int i=0; i<n/2; i++){
		int x,y;
		cin>>x>>y;
		a[x]++,b[y]++;
	}
	int amax=0,bmax=0,ai,bi;
	for(int i=0; i<100005; i++){
		if(amax<a[i])amax=a[i],ai=i;
		if(bmax<b[i])bmax=b[i],bi=i;
	}
	sort(a,a+100005,greater<int>());
	sort(b,b+100005,greater<int>());
	if(ai==bi)cout<<min(n-a[0]-b[1],n-a[1]-b[0])<<endl;
	else cout<<n-a[0]-b[0]<<endl;
}
