// inputに入力データ全体が入る
function Main(input) {
    // 入力を解釈
	input = input.split("\n");
	length = input[0];
	// tmp1Array = input[1].replace(/ /g, ',');
	nArray = input[1].split(" ").map(Number);
	
	// tmp1Array.map(Number);
	// tmp2Array = input[2].split(" ");
	
	var e = [];
	var o = [];
	
	for(var i = 0 ; i < length ; i += 2){
	    e.push(nArray[i]);
	    o.push(nArray[i + 1]);
	}
	
	// 際頻出数字
	var e_frequentSTR = maxValue(e);
	var o_frequentSTR = maxValue(o);
	
	// 際頻出数字の数
	var e_saihinSTR = sameNum(e, e_frequentSTR);
	var o_saihinSTR = sameNum(o, o_frequentSTR);
	
	var e_kakikaeNUM = e.length - e_saihinSTR;
	var o_kakikaeNUM = o.length - o_saihinSTR;
	
	if(e_kakikaeNUM == o_kakikaeNUM){
	    console.log(e.length);
	}else{
	    console.log(e_kakikaeNUM + o_kakikaeNUM);
	}

	//出力
	//console.log(e);
	//console.log(o);
	//console.log(e_saihinSTR);
	//console.log(o_saihinSTR);
	//console.log(e_kakikaeNUM);
	//console.log(o_kakikaeNUM);
	
	
}

function sameNum(Array, num){
    var ans = 0;
    
    for(var i = 0 ; i <= Array.length ; i++){
        if(num == Array[i]){
            ans++;
        }
    }
    
    return ans;
}


var counter = function(str,seq){
    return str.split(seq).length - 1;
}

function maxValue(array) {
 var counter = {}
 var maxValue = null
 var maxCounter = 0;
 
 for (var i=0;i < array.length;i++){
   if (!counter[array[i]]){
     //存在しなかれば作る
     counter[array[i]] = 0
   }
   counter[array[i]]++;

   for (var j=0;j<Object.keys(counter).length;j++){
     key = Object.keys(counter)[j];
     if (counter[key] > maxCounter){
       maxValue = key
       maxCounter = counter[key]
     }
   }

 }

 return eval(maxValue)
 // 以下のようにすることで全て文字列で返すさらに雑な実装を実現可能
 //return maxValue 
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));