#include<iostream>
#include<algorithm>
using namespace std;
int n,a[100005],b[100005],c[100005],s,t,x,y;
int main(){
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[i];
        if(i%2)c[a[i]]++;
        else b[a[i]]++;
    }
    for(int i=1;i<=100000;i++){
        if(b[i]>s)s=b[i],t=i;
        if(c[i]>x)x=c[i],y=i;
    }
    bool f=1;
    if(t==y)f=0;
    if(f){
        cout<<n-s-x<<endl;
    }
    else{
        sort(b,b+n);sort(c,c+n);
        if(b[n-2]>=c[n-2])cout<<n-x-b[n-2]<<endl;
        else cout<<n-s-c[n-2]<<endl;
    }
}