#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<ll, P> PP;

static const double EPS = 1e-8;
static const double PI = 4.0 * atan(1.0);
static const ll INF = 1023456789;

#define REP(i,n)	for(int i=0;i<n;++i)
#define REPR(i,n)	for(int i=n-1;i>=0;--i)
#define FOR(i,s,n)	for(int i=s;i<n;++i)
#define FORR(i,s,n)	for(int i=n-1;i>=s;--i)
#define ALL(c)		(c).begin(),(c).end()
#define CLEAR(v)	memset(v,0,sizeof(v))
#define MP(a,b)		make_pair((a),(b))
#define ABS(a)		((a)>0?(a):-(a))
#define F			first
#define S			second

ll n, v[100000];
P a[100001], b[100001];

int main(int argc, char **argv) {
	cin >> n;
	REP(i, n) cin >> v[i];
	REP(i, 100001) a[i] = b[i] = P{0, i};
	REP(i, n/2) ++a[v[i*2]].F;
	REP(i, n/2) ++b[v[i*2+1]].F;
	sort(a, a+100001); reverse(a, a+100001);
	sort(b, b+100001); reverse(b, b+100001);
	if (a[0].S == b[0].S) cout << min(n - a[0].F - b[1].F, n - b[0].F - a[1].F) << endl;
	else cout << (n - a[0].F - b[0].F) << endl;
	return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <math.h>
#include <map>
#include <queue>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int MOD = 1000000007;
const int iINF = 1001001001;
const long long llINF = 1LL << 60;
int main()
{
	int n, tmp;
	cin >> n;
	map<int, int> odd, even;
	rep(i, n) {
		cin >> tmp;
		if (i % 2 == 0)	even[tmp]++;
		else odd[tmp]++;
	}
	P oddMax, evenMax;
	oddMax = make_pair(-1, -1);
	evenMax = make_pair(-1, -1);
	int oddOthers, evenOthers;
	oddOthers = evenOthers = 0;
	for (auto a : odd) {
		if (oddMax.second < a.second)	oddMax = a;
	}
	for (auto a : even) {
		if (evenMax.second < a.second)	evenMax = a;
	}

	int ans = iINF;
	if (oddMax.first == evenMax.first) {
		int tmpAns = 0;
		int tmpOdd, tmpEven;
		tmpOdd = tmpEven = 0;
		for (auto a : odd) {
			if (a.first == oddMax.first) continue;
			tmpOdd += a.second;
		}
		for (auto a : even) {
			if (a.first == evenMax.first) continue;
			tmpEven += a.second;
		}


		tmpAns = tmpOdd;
		P tmpEvenMax = make_pair(-1, -1);
		for (auto a : even) {
			if (a.first == evenMax.first) continue;
			if (tmpEvenMax.second < a.second)	tmpEvenMax = a;
		}
		int tmptmpEven = 0;
		for (auto a : even) {
			if (a.first == tmpEvenMax.first) continue;
			tmptmpEven += a.second;
		}
		tmpAns += tmptmpEven;
		ans = min(ans, tmpAns);

		tmpAns = tmpEven;
		P tmpOddMax = make_pair(-1, -1);
		for (auto a : odd) {
			if (a.first == oddMax.first) continue;
			if (tmpOddMax.second < a.second)	tmpOddMax = a;
		}
		int tmptmpOdd = 0;
		for (auto a : odd) {
			if (a.first == tmpOddMax.first) continue;
			tmptmpOdd += a.second;
		}
		tmpAns += tmptmpOdd;
		ans = min(ans, tmpAns);
	}
	else {
		ans = 0;
		for (auto a : odd) {
			if (a.first == oddMax.first) continue;
			ans += a.second;
		}
		for (auto a : even) {
			if (a.first == evenMax.first) continue;
			ans += a.second;
		}
	}
	cout << ans << endl;
	return 0;
}