#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
 
using namespace __gnu_pbds;
using namespace std;
     
#define mp make_pair
#define sz(x) (int)((x).size())
#define all(x) (x).begin(),(x).end()
#define FO(x) {freopen(#x".in","r",stdin);freopen(#x".out","w",stdout);}
#define eb emplace_back
 
typedef pair< int, int > pii;
typedef pair< long long, long long > pll;
typedef long long ll;
typedef unsigned long long ull;
typedef vector< int > vi;
typedef vector< vi > vvi;
typedef vector< ll > vll;
typedef vector< vll > vvll;
typedef vector< pii > vpii;
typedef vector< vpii > vvpii;
typedef vector< pll > vpll;
typedef long double ld;
typedef vector< ld > vld;
typedef unsigned int uint;
 
const ll MOD2 = 1e9 + 7;
const int MOD = 1e9 + 7;
 
const ull infull = numeric_limits<unsigned long long>::max();
 
void fix(int &x, ll MOD) {
    x = (x % MOD);
    if(x < 0) x += MOD;
    return;
}
 
ll lgput(ll a, ll b, ll MOD) {
    ll ret = 1;
    a %= MOD;
    while(b) {
        if(b&1) ret = ret*a % MOD;
        a = a*a % MOD;
        b >>= 1;
    }
 
    return ret;
}
 
ll inv(ll a, ll MOD) {
    return lgput(a, MOD-2, MOD);
}
 
template <uint MD> struct ModInt {
    using M = ModInt;
    const static M G;
    uint v;
    ModInt(ll _v = 0) { set_v(uint(_v % MD + MD)); }
    M& set_v(uint _v) {
        v = (_v < MD) ? _v : _v - MD;
        return *this;
    }
    explicit operator bool() const { return v != 0; }
    M operator-() const { return M() - *this; }
    M operator+(const M& r) const { return M().set_v(v + r.v); }
    M operator-(const M& r) const { return M().set_v(v + MD - r.v); }
    M operator*(const M& r) const { return M().set_v(uint(ull(v) * r.v % MD)); }
    M operator/(const M& r) const { return *this * r.inv(); }
    M& operator+=(const M& r) { return *this = *this + r; }
    M& operator-=(const M& r) { return *this = *this - r; }
    M& operator*=(const M& r) { return *this = *this * r; }
    M& operator/=(const M& r) { return *this = *this / r; }
    bool operator==(const M& r) const { return v == r.v; }
    const bool operator<(const M& o) const {return v < o.v; }
    M pow(ll n) const {
        M x = *this, r = 1;
        while (n) {
            if (n & 1) r *= x;
            x *= x;
            n >>= 1;
        }
        return r;
    }
    M inv() const { return pow(MD - 2); }
    friend ostream& operator<<(ostream& os, const M& r) { return os << r.v; }
};
 
using Mint = ModInt<(int)998244353>;

int main() { 
    #ifdef BLAT
        freopen("stdin", "r", stdin);
        freopen("stderr", "w", stderr);
    #endif
 
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout.precision(12);
    srand(time(NULL));

    vi fv1(1e5 + 2);
    vi fv2(1e5 + 2);

    int n;
    cin >> n;

    vi v(n);
    for(auto &x : v) cin >> x;

    for(int i = 0; i < n; i += 2) {
        fv1[v[i]] ++;
    }
    for(int i = 1; i < n; i += 2) {
        fv2[v[i]] ++;
    }

    int max1 = 0;
    int max2 = 1;
    if(fv1[max2] > fv1[max1]) swap(max1, max2);
    for(int i = 2; i <= 1e5; ++i) {
        if(fv1[i] > fv1[max1]) {
            max2 = max1;
            max1 = i;
        } else if(fv1[i] > fv1[max2]) max2 = i;
    }

    int max3 = 0;
    int max4 = 1;
    if(fv2[max3] > fv2[max4]) swap(max3, max4);
    for(int i = 2; i <= 1e5; ++i) {
        if(fv2[i] > fv2[max3]) {
            max4 = max3;
            max3 = i;
        } else if(fv2[i] > fv2[max4]) max4 = i;
    }

    cerr << max1 << ' ' << max2 << ' ' << max3 << ' ' << max4 << '\n';
    if(max1 != max3) {
        cout << n - fv1[max1] - fv2[max3] << '\n';
    } else {
        cout << min(n - fv1[max1] - fv2[max4], n - fv1[max2] - fv2[max3]);
    }
    return 0; 
}

Measured memory_bytes: 1408