import scala.io.{StdIn => in}
import scala.collection.{mutable => mu}

object Main extends App {
  import MapHelper._
  val n = in.readInt
  val seq = in.readLine.split(" ").map(_.toInt)

  val map1 = mu.HashMap.empty[Int,Int]
  val map2 = mu.HashMap.empty[Int,Int]
  for(i <- 0 until n) {
    if(i % 2 == 0) map1.addOrUpdate(seq(i), 1)
    else map2.addOrUpdate(seq(i), 1)
  }

  val max1 = map1.toIndexedSeq.sortBy(_._2)(Ordering[Int].reverse).take(2)
  val max2 = map2.toIndexedSeq.sortBy(_._2)(Ordering[Int].reverse).take(2)
  // println(max1.mkString(" "))
  // println(max2.mkString(" "))

  val res = (max1, max2) match {
    case (a, b) if a.head._1 != b.head._1 => a.head._2 + b.head._2
    case (a, b) if a.head._2 > b.head._2 => a.head._2 + b.last._2
    case (a, b) if a.head._2 < b.head._2 => a.last._2 + b.head._2
    case _ => n / 2
  }

  val ans = n - res
  println(ans)

  object MapHelper {
    implicit class AddOrUpdate[A](map:mu.HashMap[Int,Int]) {
      def addOrUpdate(key:Int, value:Int):mu.HashMap[Int,Int] =
      {
        if(map.contains(key)) map(key) += value
        else map += (key -> value)
        map
      }
    }
  }
}