import java.math.*

fun main(args: Array<String>) {
    val n = readInputLine().toInt()
    
    val evenCnt = mutableMapOf<Int, Int>()
    val oddCnt = mutableMapOf<Int, Int>()
    
    val vs = readInputLine().split(" ").map{it.toInt()}
    
    for (i in 0 until n) {
        val num = vs[i]
        
        val useCnt = if (i % 2 == 0) oddCnt else evenCnt
        val cnt = useCnt.get(num) ?: 0
        useCnt.put(num, cnt + 1)
    }
    
    val evenList = evenCnt.toList().sortedByDescending{it.second}
    val oddList = oddCnt.toList().sortedByDescending{it.second}
    
    if (evenList.size == 1 && oddList.size == 1) {
        if (evenList.first().first != oddList.first().first) {
            println(0)
        } else {
            println(n / 2)
        }
    } else {
        if (evenList.first().first != oddList.first().first) {
            println(n - evenList.first().second - oddList.first().second)
        } else {
            println(Math.min(n - evenList[1].second - oddList.first().second, n - evenList.first().second - oddList[1].second))
        }
    }
}

fun readInputLine(): String {
    return readLine()!!
}
