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

#include<algorithm>

using namespace std;

const int M=2e5+7;

int read(){

	int ans=0,f=1,c=getchar();

	while(c<'0'||c>'9'){if(c=='-') f=-1; c=getchar();}

	while(c>='0'&&c<='9'){ans=ans*10+(c-'0'); c=getchar();}

	return ans*f;

}

int n,s[M],v1[M],v2[M];

int main(){

	n=read();

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

		s[i]=read();

		if(i&1) v1[s[i]]++;

		else v2[s[i]]++;

	}

	int id1=0,cnt1=0,id2=0,cnt2=0;

	for(int i=1;i<=1e5;i++) if(v1[i]>cnt1) cnt1=v1[i],id1=i;

	for(int i=1;i<=1e5;i++) if(i!=id1&&v1[i]>cnt2) cnt2=v1[i],id2=i;

	int id3=0,cnt3=0,id4=0,cnt4=0;

	for(int i=1;i<=1e5;i++) if(v2[i]>cnt3) cnt3=v2[i],id3=i;

	for(int i=1;i<=1e5;i++) if(i!=id3&&v2[i]>cnt4) cnt4=v2[i],id4=i;

	if(id1!=id3) printf("%d\n",n-cnt1-cnt3);

	else printf("%d\n",n-cnt1-max(cnt2,cnt4));

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.2630339948637368x):
#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  ;

        }

        

    }

}