//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> P;
typedef long long ll;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))


//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int gcd(int a, int b) {
    if(b == 0) return a;
    return gcd(b, a % b);
}

int bo[100001];
int be[100001];

int main(){
    int n;
    // int bo[1e5 + 1];
    // int be[1e5 + 1];
    int v;
    cin >> n;
    int o1, o2, e1, e2;
    int om1 = 0, om2 = 0, em1 = 0, em2 = 0;

    REP(i, n) {
        cin >> v;
        if(i % 2 == 0) {
            bo[v]++;
        } else {
            be[v]++;
        }
    }

    for(int i = 1; i <= 1e5; i++) {
        if(bo[i] > om1) {
            om2 = om1;
            o2 = o1;
            om1 = bo[i];
            o1 = i;
        } else if(bo[i] <= om1 && bo[i] > om2) {
            om2 = bo[i];
            o2 = i;
        }
    }

    for(int i = 1; i <= 1e5; i++) {
        if(be[i] > em1) {
            em2 = em1;
            e2 = e1;
            em1 = be[i];
            e1 = i;
        } else if(be[i] <= em1 && be[i] > em2) {
            em2 = be[i];
            e2 = i;
        }
    }

    if(e1 == o1) {
        if(em1 == om1) {
            if(em2 > om2) {
                cout << n / 2 - em2 + n / 2 - om1 << endl;
            } else {
                cout << n / 2 - em1 + n / 2 - om2 << endl;
            }
        } else if(em1 > om1) {
            cout << n / 2 - em1 + n / 2 - om2 << endl;
        } else {
            cout << n / 2 - om1 + n / 2 - em2 << endl;
        }
    } else {
        cout << n / 2 - om1 + n / 2 - em1 << endl;
    }

    return 0;
}


Measured memory_bytes: 1024