import std.stdio, std.algorithm, std.range, std.conv, std.string, std.math, std.container, std.typecons;
import core.stdc.stdio;
// foreach, foreach_reverse, writeln

void main() {
	int n;
	scanf("%d", &n);
	int[] v = new int[n];
	foreach (i; 0..n) {
		scanf("%d", &v[i]);
	}

	int ans = 0;
	int memkey = -1;
	int memdiff = 0;
	foreach (p; 0..2) {
		int[int] counter;
		for (int i = p; i < n; i += 2) {
			if (!(v[i] in counter)) {
				counter[v[i]] = 0;
			}
			counter[v[i]]++;
		}
		int first = 0, second = 0, firstkey = -1;
		foreach (key, val; counter) {
			if (second < val) {
				second = val;
				if (first < val) {
					swap(first, second);
					firstkey = key;
				}
			}
		}
		ans += first;
		if (p == 0) {
			memkey = firstkey;
			memdiff = first-second;
		} else if (memkey == firstkey) {
			int diff = first-second;
			ans -= min(memdiff, diff);
		}
	}
	writeln(n-ans);
}