#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;

const int N = 1e6 + 5, maxn = 1e5 + 5;
int n, a[N], b[N];
struct node {
    int cnt, v;
} s[N], t[N];

inline bool cmp(const node &p, const node &q) {
    return p.cnt > q.cnt;
}

int main() {
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), s[a[i]].v = t[a[i]].v = a[i];
    for (int i = 1; i <= n; i += 2) s[a[i]].cnt++;
    for (int i = 2; i <= n; i += 2) t[a[i]].cnt++;
    sort(s + 1, s + 1 + maxn, cmp);
    sort(t + 1, t + 1 + maxn, cmp);
    if (s[1].v == t[1].v) printf("%d\n", std::min(n - s[2].cnt - t[1].cnt, n - s[1].cnt - t[2].cnt));
    else printf("%d\n", n - s[1].cnt - t[1].cnt);
    return 0;
}