#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n, v[maxn], t;
pair<int, int>a[maxn];
map<int, int>odd, eve;
map<int, int>::iterator it;
int cal(map<int, int> x1, map<int, int> x2)
{
    int mxx = 0, xx = 0;
    for (it = x1.begin(); it != x1.end(); ++ it)
    {
        if (it -> second > mxx)
        {
            mxx = it -> second;
            xx = it -> first;
        }
    }
    int ans = n / 2 - mxx;
    t = 0;
    for (it = x2.begin(); it != x2.end(); ++ it)
    {
        ++ t, a[t].first = it -> second; a[t].second = it -> first;
    }
    sort (a + 1, a + 1 + t);
    if (a[t].second == xx)
    {
        if (t > 1)
            ans += n / 2 - a[t - 1].first;
        else
            ans += n / 2;
    }
    else
    {
        ans += n / 2 - a[t].first;
    }
    return ans;
}
void slove()
{
    scanf("%d" ,&n);
    for (int i = 1; i <= n; ++ i)
    {
        scanf("%d" ,v + i);
        if (i & 1) odd[v[i]] ++;
        else eve[v[i]] ++;
    }
    int x = cal(odd, eve), y = cal(eve, odd);
    printf("%d\n" ,min(x, y));
}
signed main()
{
    slove();
    return 0;
}
