fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val v = readLine()!!.split(" ").map { it.toInt() }
    var cv0 = IntArray(100001)
    var cv1 = IntArray(100001)
    for(i in v.indices){
        if(i%2==0){
            cv0[v[i]]++
        }else{
            cv1[v[i]]++
        }
    }
    val m0=cv0.max()!!
    val m1=cv1.max()!!
    if(cv0.indexOf(m0) == cv1.indexOf(m1)
            && cv0.count{it==m0}==1
            && cv1.count{it==m1}==1){
        val scv0=cv0.sortedDescending()
        val scv1=cv1.sortedDescending()
        val ans = n- Math.max(scv0[0]+scv1[1],scv0[1]+scv1[0])
        println(ans)
    }else{
        val ans = n-m0-m1
        println(ans)
    }

}