// Slower C++ solution:
#include<bits/stdc++.h>

typedef long long ll;

typedef long double ld;

using namespace std;

mt19937_64 mrand(chrono::steady_clock::now().time_since_epoch().count());

#define ii for(int i=1;i<=n;++i)

#define ji for(int j=1;j<=n;++j)

#define jj for(int j=1;j<=m;++j)

#define ij for(int i=1;i<=m;++i)

#define sz(x) ((ll)x.size())

#define all(x) x.begin(),x.end()

#define alll(x) x+1,x+1+n

#define asd cout<<"ok"<<endl;

#define endl '\n'



int a[100005];

int cnt[100005],cnt2[100005];

int main()

{

    int n;

    cin>>n;

    ii cin>>a[i];

    for(int i=1;i<=n;i+=2) cnt[a[i]]++;

    for(int i=2;i<=n;i+=2) cnt2[a[i]]++;

    int mx1=0,mx2=0,mi1=0,mi2=0;

    for(int i=1;i<=100000;++i) {

        if(cnt[i] > mx1) {

            mx2 = mx1, mi2 = mi1;

            mx1 = cnt[i], mi1 = i;

        } else if(cnt[i] > mx2) {

            mx2 = cnt[i], mi2 = i;

        }

    }

    int mx12=0,mx22=0,mi12=0,mi22=0;

    for(int i=1;i<=100000;++i) {

        if(cnt2[i] > mx12) {

            mx22 = mx12, mi22 = mi12;

            mx12 = cnt2[i], mi12 = i;

        } else if(cnt2[i] > mx22) {

            mx22 = cnt2[i], mi22 = i;

        }

    }

    if(mi12 != mi1) cout << n - mx1 - mx12 << endl;

    else cout << min(n-mx1-mx22,n-mx2-mx12) << endl;

}

// Faster C++ solution for the same problem (measured speedup: 1.3646152370497653x):
#include<iostream>

#include<cstdio>

#include<functional>

#include<cstring>

#include<string>

#include<vector>

#include<queue>

#include<cmath>

#include<algorithm>

#include<map>

#include<ctime>

using namespace std;

typedef long long ll;

typedef long double ld;

const int maxn = 1e5+7;

const int inf = 1e5;

const int modn = 1e9+7;

const ld eps = 1e-8;

const long double PI = acos(-1.0);

void qRead(ll &x){x = 0;char a;for(a = getchar();a <'0' || a > '9';a = getchar());for(;a >= '0' && a <= '9';a = getchar())x = x*10 + a-'0';}

void qRead(int &x){x = 0;char a;for(a = getchar();a <'0' || a > '9';a = getchar());for(;a >= '0' && a <= '9';a = getchar())x = x*10 + a-'0';}

ll qpow(ll a,ll b,ll mo = modn){

//    printf("%lld\n",mo);

    ll res = 1;

    while(b){

        if(b & 1)res = (res*a) % mo;

        a = (a*a) % mo;

        b >>= 1;

    }

    return res;

}

ld qpow(ld a,ll b){

    ld res = 1;

    while(b){

        if(b & 1)res *= a;

        a = a*a;

        b >>= 1;

    }

    return res;

}

ll gcd(ll a,ll b){

    if(!b)return a;

    return gcd(b,a%b);

}

//ll vis[maxn],prime[maxn],cnt,smallP[maxn];

//void getPrime(int n){

//    cnt = 0;

//    for(int i = 1;i <= n;i++)vis[i] = 0;

//    for(ll i = 2;i <= n;i++){

//        if(!vis[i]){

//            prime[++cnt] = i;

//            smallP[i] = i;

//        }

//        for(int j = 1;j <= cnt && i*prime[j] <= n;j++){

//            vis[prime[j]*i] = 1;

//            smallP[prime[j]*i] = prime[j];

//            if((i % prime[j]) == 0)break;

//        }

//    }

//}

//ll cnm[maxn][maxn];

//void getCnm(){

//    cnm[0][0] = 1;

//    for(int i = 1;i < maxn;i++){

//        for(int j = 0;j <= i;j++){

//            cnm[i][j] = cnm[i-1][j];

//            if(j)cnm[i][j] += cnm[i-1][j-1];

//            cnm[i][j] %= (modn-1);

//        }

//    }

//}

//ll f[maxn],invF[maxn];

//void getF(){

//    f[0] = invF[0] = 1;

//    for(int i = 1;i < maxn;i++)f[i] = f[i-1]*i % modn;

//    invF[maxn-1] = qpow(f[maxn-1],modn-2);

//    for(int i = maxn-2;i >= 1;i--)invF[i] = invF[i+1]*(i+1) % modn;

//}

int v[maxn];

int cnt[maxn];

int main(){

    int n;

    scanf("%d",&n);

    int first = 0,second = 0;

    for(int i = 1;i <= n;i++)scanf("%d",&v[i]);

    for(int i = 1;i <= n;i += 2){

        cnt[v[i]]++;

        if(cnt[v[i]] > cnt[first]){

            second = first;

            first = v[i];

        }

        else if(cnt[v[i]] > cnt[second] && v[i] != first){

            second = v[i];

        }

    }

    int ans1 = n/2-cnt[first],ans2 = n/2-cnt[second];

    int oldF = first,oldS = second;

    first = second = 0;

    for(int i = 1;i < maxn;i++)cnt[i] = 0;

    for(int i = 2;i <= n;i += 2){

        cnt[v[i]]++;

        if(cnt[v[i]] > cnt[first]){

            second = first;

            first = v[i];

        }

        else if(cnt[v[i]] > cnt[second] && v[i] != first){

            second = v[i];

        }

    }

    if(first != oldF)printf("%d\n",ans1 + n/2-cnt[first]);

    else printf("%d\n",min(ans1+n/2-cnt[second],ans2+n/2-cnt[first]));

}