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]
  val set = mu.HashSet.empty[Int]
  for(i <- 0 until n) {
    set += seq(i)
    if(i % 2 == 0) map1.addOrUpdate(seq(i), 1)
    else map2.addOrUpdate(seq(i), 1)
  }

  val max1 = map1.values.max
  val max2 = map2.values.max
  val res1 = (n / 2) - max1
  val res2 = (n - (n / 2)) - max2
  // println(map1.mkString(" "))
  // println(map2.mkString(" "))
  // println(res1 + " " + res2)

  val ans = if(set.size == 1) n / 2 else res1 + res2
  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
      }
    }
  }
}