#include<bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define int long long
#define vec(a,n) vector<int> (a)((n))
#define Vec(a,n) vector<string> (a)((n))
#define twovec(a,n,m) vector<vector<int>> a(n,vector<int>(m,0))
#define Twovec(a,n,m) vector<vector<double>> a(n,vector<double>(m,0))
#define P pair<int,int>
#define All(a) (a).begin(),(a).end()
#define Sort(a) sort(All(a))
#define Reverse(a) reverse(All(a))
#define PQ(n) priority_queue<P,vector<P>,greater<P>> (n)
#define pq(n) priority_queue<int> (n)
#define Lower(a,t) lower_bound(All(a),t)
using namespace std;
void Debug(auto a);
 
 
signed main(){
    int n;
    cin >> n;
    vec(a,100010);
    vec(b,100010);
    vec(c,100010);
    vec(d,100010);
    REP(i,n){
        int t;
        if(i%2==0){
            cin >> t;
            a[t]++;
            c[t]++;
        }
        else{
            cin >> t;
            b[t]++;
            d[t]++;
        }
    }
    Sort(c);
    Sort(d);
    Reverse(c);
    Reverse(d);
    REP(i,100010){
        int a_max = -1;
        int b_max = -2;
        if(a[i] == c[0]){
            a_max = a[i];
        }
        if(b[i] == d[0]){
            b_max = b[i];
        }
        if(a_max == b_max){
            if(d[1]>= c[1]){
                d[0] = d[1];
            }
            else{
                c[0] = c[1];
            }
        }
    }
    cout << n - (d[0] + c[0]) << endl;
 
 
    return 0;
}