// Slower C++ solution:
#include <iostream>

#include <map>

#include <vector>

#include <algorithm>

#include <string.h>

using namespace std;

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

#define pb push_back

#define ff first

#define ss second

typedef long long ll;



const int N=1e5+100;

int f[N];



int main(){

	int n;cin>>n;

	map<int,int>M;

	vector<int>vec1;

	vector<int>vec2;

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

		int val;cin>>val;

		M[val]++;

		if(i&1)vec2.pb(val);

		else vec1.pb(val);

	}

	if(sz(M)==1){

		cout<<n/2<<endl;

		return 0;

	}

	int mx=0,id=-1;

	for(int i=0;i<sz(vec1);i++){

		f[vec1[i]]++;

		if(f[vec1[i]]>mx){

			mx=f[vec1[i]];

			id=vec1[i];

		}

	}

	memset(f,0,sizeof(f));

	int mx2=0,id2=-1;

	for(int i=0;i<sz(vec2);i++){

		f[vec2[i]]++;

		if(f[vec2[i]]>mx2){

			mx2=f[vec2[i]];

			id2=vec2[i];

		}

	}

	if(id!=id2)cout<<sz(vec1)-mx+sz(vec2)-mx2<<endl;

	else{

		int ans=N;

		for(int g=0;g<2;g++){

			memset(f,0,sizeof(f));

			int x=0;

			for(int i=0;i<sz(vec2);i++)if(vec2[i]!=id2){

				f[vec2[i]]++;

				if(f[vec2[i]]>x)x=f[vec2[i]];

			}

			ans=min(ans,sz(vec1)-mx+sz(vec2)-x);

			swap(vec1,vec2);

			swap(id,id2);

			swap(mx,mx2);

		}

		cout<<ans<<endl;



	}

	

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.3804065046643443x):
//nani?

#include<bits/stdc++.h>

#define pi acos(-1);

#define fs first

#define sc second

#define pb push_back

#define mp make_pair

#define f(i,a,b) for( int i = a; i < b ; i++ )

#define sor(a) sort( a.begin(), a.end() )

#define rsor(a) sort( a.rbegin(), a.rend() )

#define fastio ios_base::sync_with_stdio(0);cin.tie(0)

typedef long long ll;

typedef double ld;

using namespace std;

const ll inf=1e10+6;

const ll MOD=1e9+7;

const ll mod=998244353;

// ac cmtr;

const int MX = 1e6+5;

const int LG = 25;



#define trace(...) fff(#__VA_ARGS__, __VA_ARGS__)

template<typename t> void fff(const char* x, t&& val1) { cout<<x<< " : "<<val1<<"\n";}

template<typename t1, typename... t2> void fff(const char* x, t1&& val1, t2&&... val2){

    const char* xd=strchr(x+1, ',');

    cout.write(x, xd-x)<<" : "<<val1<<" | ";

    fff(xd+1, val2...);

}

 

//---------------------------



ll a[MX];



int main(){

    fastio;

    ll n;

    cin>>n;

    map <ll,ll> m1;

    map <ll,ll> m2;

    vector <pair <ll,ll> > v1;

    vector <pair <ll,ll> > v2;

    f(i,0,n){

        cin>>a[i];

        if(i%2==0) m1[a[i]]++;

        else m2[a[i]]++;

    }

    for(auto xd : m1){

        v1.pb({xd.sc,xd.fs});

    }

    for(auto xd : m2){

        v2.pb({xd.sc,xd.fs});

    }

    rsor(v1);rsor(v2);

    if(v1.size() == 1 && v2.size() == 1){

        if(v1[0].sc == v2[0].sc) {cout<<n/2<<endl;return 0;}

        cout<<0<<endl;return 0;

    }

    if(v1.size() == 1 && v2.size() >= 2){

        if(v1[0].sc != v2[0].sc) {cout<<n/2-v2[0].fs<<endl;return 0;}

        else{

            cout<<n/2-v2[1].fs<<endl;return 0;

        }

    }

    if(v2.size() == 1 && v1.size() >= 2){

        if(v1[0].sc != v2[0].sc) {cout<<n/2-v1[0].fs<<endl;return 0;}

        else{

            cout<<n/2-v1[1].fs<<endl;return 0;

        }

    }



    if(v1[0].sc != v2[0].sc){

        cout<<n-v1[0].fs-v2[0].fs<<endl;return 0;

    }

    else{

        ll ans = min(n-v1[0].fs-v2[1].fs,n-v1[1].fs-v2[0].fs);

        cout<<ans<<endl;

        return 0;

    }











}