#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

int g[100005], k[100005], n, ans;
int main(){
    cin >> n;
    n /= 2;

    int maxk=0, maxg=0;
    for(int i=0; i<n; ++i){
        int w1, w2;
        cin >> w1 >> w2;
        ++k[w1]; ++g[w2];
        if(k[maxk] < k[w1]){ maxk = w1; }
        if(g[maxg] < g[w2]){ maxg = w2; }        
    }

    sort(g, g+100001);  reverse(g, g+100001);
    sort(k, k+100001);  reverse(k, k+100001);


    if(maxk == maxg){
        int w1 = n - g[0] + n - k[1];
        int w2 = n - g[1] + n - k[0];
        cout << min(w1, w2) << endl;
    }else{
        ans = n - g[0] + n - k[0];
        
        cout << ans << endl;
    }

}