fun main(args: Array<String>) {
    val N = nextInt()
    val A = listOfInt()
    val O = A.filterIndexed { index, a -> index < N && index % 2 != 0 }
    val E = A.filterIndexed { index, a -> index < N && index % 2 == 0 }
    fun same(v: List<Int>) = v.all { it == v[0] }
    if (same(O) && same(E) && O[0] != E[0]) {
        println(0)
        return
    }
    val Ov = Array(100001) { 0 to 0 }
    val Ev = Array(100001) { 0 to 0 }
    O.forEach { v -> Ov[v] = v to Ov[v].second + 1 }
    E.forEach { v -> Ev[v] = v to Ev[v].second + 1 }
    Ov.sortBy { -it.second }
    Ev.sortBy { -it.second }
    val e0 = E.size - Ev[0].second
    val e1 = E.size - Ev[1].second
    val o0 = O.size - Ov[0].second
    val o1 = O.size - Ov[1].second
    val ans = if (Ev[0].first != Ov[0].first) e0 + o0 else Math.min(e0 + o1, e1 + o0)
    println(ans)
}
fun next() = readLine()!!
fun nextInt() = Integer.parseInt(next())
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map { Integer.parseInt(it) }
fun listOfLong() = listOfString().map { java.lang.Long.parseLong(it) }
