object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt
  val v = List.fill(n)(sc.nextInt)
  var mOdd = Map(-1 -> 0)
  var mEven = Map(-1 -> 0)
  v.zipWithIndex.foreach{ case (x, idx) =>
    if (idx % 2 == 0) {
      mEven += x -> (mEven.getOrElse(x,0) + 1)
    } else {
      mOdd += x -> (mOdd.getOrElse(x,0) + 1)
    }
  }

  def cost(v1: Int, v2: Int): Int = {
    (n/2 - v1) + (n/2 - v2)
  }

  val mEvenSorted = mEven.toVector.sortBy(_._2).reverse
  val mOddSorted = mOdd.toVector.sortBy(_._2).reverse

  println((mEvenSorted(0), mOddSorted(0)) match { case ((e11,v11), (e12,v12)) =>
    if (e11 != e12) cost(v11,v12)
    else (mEvenSorted(1), mOddSorted(1)) match { case ((e21,v21), (e22,v22)) =>
      cost(v11,v22).min(cost(v12, v21))
    }
  })
}