object Main extends App {
  import scala.io.StdIn._
  val n = readLine.trim.toInt
  val num = readLine.trim.split(' ').map(_.toInt)
  val oddCount = Array.tabulate(100001){_ ⇒ 0}
  val evenCount = Array.tabulate(100001){_ ⇒ 0}
  for (i ← num.indices){
    if (i % 2 == 0){
      evenCount(num(i)) += 1
    }else {
      oddCount(num(i)) += 1
    }
  }
  val oddSorted = oddCount.zipWithIndex.sortBy{case (v, _) ⇒ v}.reverse
  val evenSorted = evenCount.zipWithIndex.sortBy{case (v, _) ⇒ v}.reverse
  println(
    if (oddSorted.head._2 == evenSorted.head._2) {
      if (oddSorted(0)._1 + evenSorted(1)._1 > oddSorted(1)._1 + evenSorted(0)._1) n - (oddSorted(0)._1 + evenSorted(1)._1) else n - (oddSorted(1)._1 + evenSorted(0)._1)
    }else n - (oddSorted.head._1 + evenSorted.head._1)
  )
}