#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <utility>
#include <functional>
#include <iomanip>
#include <typeinfo>
#include <iterator>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <tuple>
#include <map>
#include <set>
using namespace std;


typedef long long       ll;
struct edge { ll to; ll cost; };
typedef vector<int>     vi;
typedef vector<ll>      vll;
typedef vector<double>  vd;
typedef vector<bool>    vb;
typedef vector<string>  vs;
typedef vector<char>    vc;
typedef vector<edge>    ve;
typedef pair<int, int>  pii;
typedef pair<ll, ll>    pll;
typedef vector<pii>     vpii;
typedef vector<pll>     vpll;
typedef vector<vll>		vvll;
typedef vector<vi>		vvi;
typedef vector<ve>      vve;
typedef vector<vc>		vvc;

// マクロ
#define repr(itr, bgn, end) for (ll itr = (ll)bgn; itr < (ll)end; ++itr)
#define rep(itr, end) repr(itr, 0, end)
#define reprrev(itr, bgn, end) for (ll itr = (ll)end - 1; itr >= (ll)bgn; --i)
#define reprev(itr, end) reprrev(itr, 0, end)
#define all(container) container.begin(), container.end()
#define sortall(container) sort(all(container))
#define yn(cond) cond ? (cout << "Yes" << endl) : (cout << "No" << endl)
#define YN(cond) cond ? (cout << "YES" << endl) : (cout << "NO" << endl)

// 定数
#define LLONG_MAX 9223372036854775807
constexpr double PI = 3.14159265358979323846;
constexpr ll INF = 1 << 15;
constexpr ll MOD = (ll)1e9 + 7;
constexpr double EPS = 1e-7;

// よく使うもの
constexpr int dy[4] = { 0, 1, 0, -1 };
constexpr int dx[4] = { 1, 0, -1, 0 };


// vector入力
template<typename T>
istream& operator >> (istream& is, vector<T>& vec) {
	for (T& x : vec) is >> x;
	return is;
}

// vector出力
template<typename T>
ostream& operator << (ostream& os, vector<T>& vec) {
	for (T& x : vec) os << x << " ";
	return os;
}

// ***<ここから>****************************************************************

long long Pow(long long a, long long n) {
	long long x = 1;
	while (n > 0) {
		if (n & 1) x = x * a;
		a = a * a;
		n = n >> 1;
	}
	return x;
}

int main(void) {

	int n;
	cin >> n;
	vi v(n);
	cin >> v;

	vi v1(n / 2), v2(n / 2);
	rep(i, n) if (i % 2 == 0) v1[i / 2] = v[i]; else v2[i / 2] = v[i];

	sortall(v1);
	sortall(v2);

	int ma1 = 0;
	int ptr = 0;
	int b;
	while(true) {
		int c = 1;
		while (ptr + 1 < n / 2 && v1[ptr] == v1[ptr + 1]) {
			c++;
			ptr++;
		}
		if (ma1 < c) {
			ma1 = c;
			b = v1[max(0, ptr - 1)];
		}
		ptr++;
		if (ptr + 1 >= n / 2) break;
	}

	int ma2 = 0;
	ptr = 0;
	while (true) {
		int c = 1;
		while (ptr + 1 < n / 2 && v2[ptr] == v2[ptr + 1]) {
			c++;
			ptr++;
		}
		if (ma2 < c && b != v2[max(0, ptr - 1)]) {
			ma2 = c;
		}
		ptr++;
		if (ptr + 1 >= n / 2) break;
	}

	int ans1 = n - ma1 - ma2;


	ma2 = 0;
	ptr = 0;
	while (true) {
		int c = 1;
		while (ptr + 1 < n / 2 && v2[ptr] == v2[ptr + 1]) {
			c++;
			ptr++;
		}
		if (ma2 < c) {
			ma2 = c;
			b = v2[max(0, ptr - 1)];
		}
		ptr++;
		if (ptr + 1 >= n / 2) break;
	}

	ma1 = 0;
	ptr = 0;
	while (true) {
		int c = 1;
		while (ptr + 1 < n / 2 && v1[ptr] == v1[ptr + 1]) {
			c++;
			ptr++;
		}
		if (ma1 < c && b != v1[max(0, ptr - 1)]) {
			ma1 = c;
		}
		ptr++;
		if (ptr + 1 >= n / 2) break;
	}

	int ans2 = n - ma1 - ma2;

	cout << min(ans1, ans2) << endl;

	return 0;
}


Measured memory_bytes: 1024