// 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.3999806178744731x):
#include<bits/stdc++.h>



using namespace std;



typedef long long int ll ; 



int  main()

{

    int t  ;

    

    t = 1 ;

    

    while(t--)

    {

        int n ;

        

        cin >> n ;

        

        int a[n] , countodd=0 , counteven=0 , minoddswap=n , minevenswap=n , maxodd , maxeven , secondminevenswap=n , secondminoddswap=n ;

        

        map<int,int> odd , even ;

        

        for(auto &i : a) cin >> i ;

        

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

        {

            if(i%2) 

            {

                if(odd.find(a[i])==odd.end()) odd[a[i]]=1 , countodd++ ;

                

                else odd[a[i]]++ ;

            }

            else

            {

                if(even.find(a[i])==even.end()) even[a[i]]=1 , counteven++ ;

                

                else even[a[i]]++ ;

            }

        }

        if((counteven==1)&(countodd==1))

        {

            if(a[0]==a[1]) cout << n/2 ;

            

            else cout << 0 ;

        }

        else

        {

            for(auto it=odd.begin();it!=odd.end();it++)

            {

                if((n/2)-(it->second) < minoddswap)

                {

                    maxodd = it->first ;

                    

                    minoddswap =(n/2) - (it->second) ;

                }

            }

            

            for(auto it=even.begin();it!=even.end();it++)

            {

                if((n/2)-(it->second) < minevenswap)

                {

                    maxeven = it->first ;

                    

                    minevenswap = (n/2) - (it->second) ;

                }

            }

        

            //if(countodd==1)

            {

                for(auto it = even.begin() ; it!=even.end() ; it++)

                {

                    if(it->first!=maxeven) secondminevenswap = min(secondminevenswap , (n/2) - (it->second)) ;

                }

            }

            //else if(counteven==1)

            {

                for(auto it = odd.begin() ; it!=odd.end() ; it++)

                {

                    if(it->first!=maxodd) secondminoddswap = min(secondminoddswap , (n/2) - (it->second)) ;

                }

            }

            if(maxodd==maxeven)

            {

               if(countodd==1) cout << minoddswap + secondminevenswap ;

               else if(counteven==1) cout << minevenswap + secondminoddswap ;

               else cout<<min(minoddswap + secondminevenswap , minevenswap + secondminoddswap) ;

            }

            else cout << minevenswap + minoddswap  ;

        }

        

    }

}