#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n, v[maxn], t;
map<int, int>odd, eve;
map<int, int>::iterator it;
struct node
{
    int x, c;
    friend bool operator <(const node &a, const node &b)
    {
        return a.c > b.c;
    }
}a[maxn], b[maxn];
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 t1 = 0, t2 = 0;
    for (it = odd.begin(); it != odd.end(); ++ it)
    {
        ++ t1; a[t1].x = it -> first; a[t1].c = it -> second;
    }
    sort (a + 1, a + 1 + t1);
    for (it = eve.begin(); it != eve.end(); ++ it)
    {
        ++ t2; b[t2].x = it -> first; b[t2].c = it -> second;
    }
    sort (b + 1, b + 1 + t2);
    int ans = 0;
    if (a[1].x != b[1].x)
    {
        ans = n - a[1].c - b[1].c;
    }
    else
    {
        int axx = n - a[1].c - b[2].c;
        int bxx = n - a[2].c - b[1].c;
        ans = min(axx, bxx);
    }
    printf("%d\n" ,ans);
}
signed main()
{
    slove();
    return 0;
}
