#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<stack>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pII;
#define pb push_back
#define X first
#define Y second
#define mp make_pair
#define clr(x,y) memset(x,y,sizeof(x))
#define FOR(i, x, y) for (decay<decltype(y)>::type i = (x), _##i = (y); i < _##i; ++i)
#define FORD(i, x, y) for (decay<decltype(x)>::type i = (x), _##i = (y); i > _##i; --i)
const int inf=0x3f3f3f3f;
const ll mod=1e9+7;
const int maxn=1e5+5;
//ll fmod(ll x,ll y){ll res=1;while(y){if(y&1)res=res*x%mod;y>>=1;x=x*x%mod;}return res;}
//ll gcd(ll x,ll y){return y==0?x:gcd(y,x%y);}
int dp[3][maxn];
int main()
{
    int n;
    while(cin>>n)
    {
       int op = 0;
       int num1 = 0,num2 = 0;
       for(int i = 0; i < n; ++i)
       {
           if(!op)
           scanf("%d",&dp[op][num1++]);
           else
           scanf("%d",&dp[op][num2++]);

           op ^= 1;
       }

       sort(dp[0], dp[0] + num1);
       sort(dp[1], dp[1] + num2);

       vector<pii>p[3];
       int res = 0;
       int pre;
       for(int i = 0; i < num1; i++)
       {
           if(res == 0)
           {
               res = 1;
               pre = dp[0][i];
           }
           else if(pre == dp[0][i])
           {
               res++;
           }
           else
           {
               //cout<<i<<endl;
               p[0].pb({res,pre});
               res = 1;
               pre = dp[0][i];
           }
       }
       p[0].pb({res,pre});

        res = 0;
        pre;
       for(int i = 0; i < num2; i++)
       {
           if(res == 0)
           {
               res = 1;
               pre = dp[1][i];
           }
           else if(pre == dp[1][i])
           {
               res++;
           }
           else
           {
               p[1].pb({res,pre});
               res = 1;
               pre = dp[1][i];
           }
       }
       p[1].pb({res,pre});

       sort(p[0].begin(),p[0].end());
       sort(p[1].begin(),p[1].end());
       int xx = p[0].size();
       int yy = p[1].size();
       int ans = 0;

       if(xx == 1&&yy == 1)
       {
           //cout<<1;
           //cout<<xx<<"  "<<yy;
           if(p[0][0].Y == p[1][0].Y)
            ans = max(p[0][0].X, p[1][0].X);
            else
             ans = p[0][0].X + p[1][0].X;
       }
       else if(xx == 1)
       {
           //cout<<2;
           if(p[0][0].Y == p[1][yy-1].Y)
           ans = max(p[0][0].X + p[1][yy-2].X,p[1][yy-1].X);
           else
           ans = p[0][0].X + p[1][yy-1].X;
       }
       else if(yy == 1)
       {
           //cout<<3;
           if(p[1][0].Y == p[0][xx-1].Y)
           ans = max(p[1][0].X + p[0][xx-2].X,p[0][xx-1].X);
           else
           ans = p[1][0].X + p[0][xx-1].X;
       }
       else
       {
           //cout<<4;
           if(p[1][yy-1].Y == p[0][xx-1].Y)
           ans = max(p[1][yy-1].X + p[0][xx-2].X,p[0][xx-1].X + p[1][yy-2].X);
           else
           ans = p[1][yy-1].X + p[0][xx-1].X;
       }

       printf("%d\n",n - ans);
    }
}












Measured memory_bytes: 1784