// Original C++ solution (slower):
#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]));

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#define maxn 100010

int cnt[2][maxn], M[2], Q[2], m[2], q[2];

int n;

int main() {

    scanf("%d", &n);

    for (int i = 1, x, p; i <= n; i++) {

        scanf("%d", &x); p = i % 2;

        cnt[p][x]++;

        if (M[p] < cnt[p][x]) M[p] = cnt[p][x], Q[p] = x;

    }

    if (Q[0] != Q[1]) {

        printf("%d\n", n - M[0] - M[1]);

        return 0;

    }

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

        if (m[0] < cnt[0][i] && i != Q[0]) m[0] = cnt[0][i], q[0] = i;

        if (m[1] < cnt[1][i] && i != Q[1]) m[1] = cnt[1][i], q[1] = i;

    }

    if (M[0] - m[0] > M[1] - m[1]) printf("%d\n", n - M[0] - m[1]);

    else printf("%d\n", n - m[0] - M[1]);

    return 0;

}

// Fastest known solution for this problem: