#include <bits/stdc++.h>
using namespace std;

struct Node{
	int v, id;
};

const int N = 1e5 + 10;

int a[N];
Node cnt0[N], cnt1[N];

bool cmp(const Node& x, const Node& y){
	return x.v > y.v;
}

int main(){
	int n;
	scanf("%d",&n);
	for (int i = 1; i <= 100000; i++){
		cnt0[i].v = cnt1[i].v = 0;
		cnt0[i].id = cnt1[i].id = i;
	}
	for (int i = 1; i <= n; i++){
		scanf("%d",&a[i]);
		if (i & 1) cnt1[a[i]].v++;
		else cnt0[a[i]].v++;
	}
	sort(cnt0 + 1, cnt0 + 100000 + 1, cmp);
	sort(cnt1 + 1, cnt1 + 100000 + 1, cmp);
	if (cnt0[1].id == cnt1[1].id)
		printf("%d\n", n - max(cnt0[1].v + cnt1[2].v, cnt0[2].v + cnt1[1].v));
	else
		printf("%d\n", n - cnt0[1].v - cnt1[1].v);
	return 0;
}