#include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    int n;
    int constexpr N = 100009;
    vector<pair<int, int>> f[2] = {vector<pair<int, int>>(N), vector<pair<int, int>>(N)};
    for(int i = 0; i < N; ++i) f[0][i] = f[1][i] = {0, i};
    cin >> n;
    for(int i = 0, e; i < n; ++i) {
        cin >> e;
        f[i % 2][e].fi += 1;
    }
    sort(f[0].rbegin(), f[0].rend());
    sort(f[1].rbegin(), f[1].rend());
    if(f[0][0].se != f[1][0].se) cout << n - f[0][0].fi - f[1][0].fi << endl;
    else cout << min(n - f[0][0].fi - f[1][1].fi, n - f[0][1].fi - f[1][0].fi) << endl;
}