import std.stdio, std.string, std.conv;
import std.typecons;
import std.algorithm, std.array, std.range, std.container;
import std.math;

void main() {
	auto n = readln.split[0].to!ulong;
	auto v = readln.split.to!(ulong[]);
	ulong[] v_odd, v_even;
	iota(1, n, 2).each!(x => v_even ~= v[x]);
	iota(0, n, 2).each!(x => v_odd  ~= v[x]);
	
	ulong[] count_odd, count_even; count_odd.length = 10^^5+1; count_even.length = 10^^5+1;
	
	foreach(num; v_odd)  { ++count_odd[num]; }
	foreach(num; v_even) { ++count_even[num]; }
	
	ulong odd_i, even_i;
	(10^^5+1).iota.each!( x => odd_i  = count_odd [x] < count_odd [odd_i]  ? odd_i  : x ),
	(10^^5+1).iota.each!( x => even_i = count_even[x] < count_even[even_i] ? even_i : x );
	
	if (odd_i != even_i) {
		writeln(v_odd.length - count_odd[odd_i] + v_even.length - count_even[even_i]);
	}
	else {
		ulong odd_i_, even_i_;
		ulong e, o;
		// second most frequent
		e = count_even[even_i], count_even[even_i] = 0;
		(10^^5+1).iota.each!( x => even_i_ = count_even[x] < count_even[even_i_] ? even_i_ : x );
		o = count_odd[odd_i],   count_odd[odd_i] = 0;
		(10^^5+1).iota.each!( x => odd_i_ = count_odd[x] < count_odd[odd_i_] ? odd_i_ : x );
		
		writeln(
			min(v_odd.length - o  + v_even.length - count_even[even_i_],
				v_odd.length - count_odd[odd_i_] + v_even.length - e
			)
		);
	}
	
}