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

}


// Faster C++ solution for the same problem (measured speedup: 1.3373579220214407x):
#include <bits/stdc++.h>

using namespace std;

#define int long long

#define pb push_back

#define pf push_front

#define pii pair <int, int>

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

#define time cerr << '\n' << (double)clock()/CLOCKS_PER_SEC << '\n'; return 0

 

//link: https://atcoder.jp/contests/arc103/tasks/arc103_a

 

vector <int> e;

vector <int> o;

map <int, int> mpe;

map <int, int> mpo;

int32_t main() {

	ios_base::sync_with_stdio(0); cin.tie(0);

	bool can = true;

	int n; cin >> n;

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

		int x; cin >> x;

		if (i % 2 == 0) o.pb(x);

		else e.pb(x);

	}

	// find the top 2 modes

	for(auto it:e) {

		++mpe[it];

	}

	vector <pii> MPE; // convert to vector for sorting

	for(auto it:mpe) {

		MPE.pb(make_pair(it.second, it.first));

	}

	sort(all(MPE), greater<pair<int, int> > ());

	int e1 = MPE[0].second;

	int e2 = MPE[1].second;

	cerr << e1 << ' ' << e2 << '\n';

	// repeat!!

	for(auto it:o) {

		++mpo[it];

	}

	vector <pii> MPO;

	for(auto it:mpo) {

		MPO.pb(make_pair(it.second, it.first));

	}

	sort(all(MPO), greater<pair<int, int> >());

	int o1 = MPO[0].second;

	int o2 = MPO[1].second;

	cerr << o1 << ' ' << o2 << '\n';

 

	if (e1 != o1) {

		// assert(0);

		int count = 0;

		for(auto it:e) {

			if (it != e1) ++count;

		}

		for(auto it:o) {

			if (it != o1) ++count;

		}

		cout << count;

		time;

	}

 

	// find the number of changes required for first type

	int count = 0;

	for(auto it:e) {

		if (it != e1) ++count;

	}

	for(auto it:o) {

		if (it != o2) ++count;

	}

	// second type

	int sum = 0;

	for(auto it:e) {

		if (it != e2) ++sum;

	}

	for(auto it:o) {

		if (it != o1) ++sum;

	}

	cout << min(count, sum);

}