import std.stdio,std.regex;

void main(){
	auto n = readMany();
	auto list = readMany();
	
	size_t[] memo,memo2;
	memo2.length = memo.length = 100_009;
	for( size_t i=0 ; i<list.length ; i+=2 ){
		memo[list[i]]++;
	}
	for( size_t i=1 ; i<list.length ; i+=2 ){
		memo2[list[i]]++;
	}

	size_t key1,key2,m1,m2;
	foreach( key,val ; memo ){
		if( m1<val ){
			m1 = val;
			key1 = key;
		}
	}
	foreach( key,val ; memo2 ){
		if( m2<val ){
			m2 = val;
			key2 = key;
		}
	}
	if( key1 == key2 ){
		writeln(list.length/2);
	}else{
		writeln((list.length/2-m1)+(list.length/2-m2));
	}
	return;
}

import std.string,std.conv;

T[] readMany( T = size_t )(){
	T[] ret;
	foreach( val; readln().chomp().split() ){
		ret ~= val.to!T();
	}
	return ret;
}
