import java.io.{InputStream, OutputStream, PrintStream}
import java.util.Scanner

object Main {

  def main(args: Array[String]): Unit = {
    val solver = new Solver(System.in, System.out)
    solver.solve()
  }

  class Solver(in: InputStream, out: OutputStream) {
    lazy val input = new Scanner(in)

    lazy val output = new PrintStream(out)

    def solve(): Unit = {
      val n  = input.nextLine().toInt
      val vs = input.nextLine().split(" ").map(_.toInt)

      val (tops, bottoms) = vs.zipWithIndex.partition { case (v, i) => i % 2 == 0 }

      val results = for {
        (topVal, topCount) <- tops
          .map(_._1)
          .groupBy(identity)
          .map { case (v, vs) => (v, vs.size) }
          .toSeq
          .sortBy(-_._2)
          .take(2)
        (bottomVal, bottomCount) <- bottoms
          .map(_._1)
          .groupBy(identity)
          .map { case (v, vs) => (v, vs.size) }
          .toSeq
          .sortBy(-_._2)
          .take(2)
        if topVal != bottomVal
      } yield n - topCount - bottomCount

      if (results.isEmpty) {
        println(n/2)
      } else {
        println(results.min)
      }

    }

  }

}
