#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pint = pair<int,int>;


const long long INFLL = 1LL << 60;
const int INFI = 1000000000;

pair<int,int> func(map<int,int> m){
    int MAX = -1; int IDX;
    for(auto i=m.begin();i!=m.end();i++){
        if(MAX<i->second){IDX=i->first; MAX=i->second;}
    }
    pair<int, int> p = make_pair(IDX,MAX);
    return p;
}

int main() {
    int n; cin >> n;
    map<int,int> m1{};
    map<int ,int> m2{};
    for(int i=0;i<n;i++){
        int m; cin>>m;
        if(i%2==0)m1[m]++;
        else m2[m]++;
    }
    pair<int, int> M1 = func(m1);
    pair<int, int> M2 = func(m2);
    //cout << M1.first << M2.first << endl;
    if(M1.first == M2.first){
        m1[M1.first]=0; m2[M2.first]=0;
        pair<int, int> M3 = func(m1);
        pair<int, int> M4 = func(m2);
        cout << n-max(M1.second+M4.second, M2.second+M3.second) << endl;
    }
    else cout << n-M1.second- M2.second << endl;
}


#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define all(x) x.begin(),x.end()
#define rep(i,j,n) for (long long i = j; i < (long long)(n); i++)
#define _GLIBCXX_DEBUG
#define MOD 1000000007
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//name[i][j]-> vvl name(i,vl(j))
//map<int,int>mp
//余りを切り上げる =>  (a + b - 1) / b 

signed main(){
	ll n; cin>>n;
	map<ll,ll> a,b;
	rep(i,1,n+1){
		ll m; cin>>m;
		if(i%2==0){//偶数
			a[m]++;
		}
		else{
			b[m]++;
		}
	}
	vector<pair<ll,ll>> q(n),p(n);
	// q=even p=odd
	for(auto c:a) q.push_back(make_pair(c.second,c.first));
	for(auto c:b) p.push_back(make_pair(c.second,c.first));
	sort(all(p)); reverse(all(p));
	sort(all(q)); reverse(all(q));
	ll x,y;
	ll ans=n;
	rep(i,0,q.size()){
		if(i==2)break;
		rep(j,0,p.size()){
			if(j==2)break;
			if(q[i].second!=p[j].second){
				chmin(ans,n-q[i].first-p[j].first);
			}
		}
	}
	if(ans==n)ans/=2;
	cout<<ans<<endl;
	
	
	
	return 0;
}