//  Created by liszt on 2019/07/31.
#include<bits/stdc++.h>
using namespace std;

int main(){
    //input
    int n,omax=0,emax=0,om,em,i,a,b;
    vector<int> o(100001,0);
    vector<int> e(100001,0);
    cin>>n;
    
    for(i=0;i<n/2;i++){
        cin>>a>>b;
        o[b]++; e[a]++;
        if(o[b]>omax){omax=o[b];om=b;}
        if(e[a]>emax){emax=e[a];em=a;}
    }
    
    sort(o.rbegin(),o.rend());
    sort(e.rbegin(),e.rend());

    if(om!=em){
        cout<<n-o[0]-e[0]<<endl;
    }else{
        cout<<min(n-o[0]-e[1],n-o[1]-e[0])<<endl;
    }
    return 0;
}