#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#define N 200005
using namespace std;
int n,a[N];
int mp1[N],mp2[N];
int mx=0,pos=0,mn=0;
int mx2=0,pos2=0,mn2=0;
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++)scanf("%d",a+i);
for(int i=1;i<=n;i+=2){mp1[a[i]]++;if(mp1[a[i]]>mx)mx=mp1[a[i]],pos=a[i];else if(mp1[a[i]]>mn)mn=mp1[a[i]];}
for(int i=2;i<=n;i+=2){mp2[a[i]]++;if(mp2[a[i]]>mx2)mx2=mp2[a[i]],pos2=a[i];else if(mp1[a[i]]>mn2)mn2=mp2[a[i]];}
// cout<<mx<<" "<<pos<<" "<<mx2<<" "<<pos2<<endl;
if(pos!=pos2){
    printf("%d\n",n-mx-mx2);
}
else{
    printf("%d",n-max(mx+mn2,mx2+mn));
}
}