object Main {
  import java.util.Scanner

  def readStrings(n: Int)(implicit sc: Scanner): Array[String] = Array.fill(n) { sc.next() }
  def readInts(n: Int)(implicit sc: Scanner): Array[Int] = Array.fill(n) { sc.nextInt() }
  def readLongs(n: Int)(implicit sc: Scanner): Array[Long] = Array.fill(n) { sc.nextLong() }
  def readLineStrings(implicit sc: Scanner): Array[String] = sc.nextLine().split(' ')
  def readLineInts(implicit sc: Scanner): Array[Int] = readLineStrings.map(_.toInt)
  def readLineLongs(implicit sc: Scanner): Array[Long] = readLineStrings.map(_.toLong)

  def main(args: Array[String]): Unit = solve(new Scanner(System.in))

  def mode[T](list: List[T]): (T, Int) = list.groupBy(identity).mapValues(_.size).maxBy(_._2)
  def secondMode[T](list: List[T]): Option[(T, Int)] = list.groupBy(identity).mapValues(_.size).toList.sortBy(_._2).drop(1).headOption

  def solve(implicit sc: Scanner): Unit = {
    val Array(n) = readLineInts
    val v = readLineInts
    val even = v.zipWithIndex.filter { case (_, index) => index % 2 == 0}.map(_._1).toList
    val odd = v.zipWithIndex.filter { case (_, index) => index % 2 == 1}.map(_._1).toList
    val evenMode = mode(even)
    val oddMode = mode(odd)
    if (evenMode._1 == oddMode._1) {
      val secondOddMode = secondMode(odd)
      val secondEvenMode = secondMode(even)

      if (evenMode._2 > oddMode._2) {
        println(n - (evenMode._2 + secondMode(odd).get._2))
      } else if (evenMode._2 < oddMode._2) {
        println(n - (oddMode._2 + secondMode(even).get._2))
      } else {
        if (secondOddMode.isEmpty || secondEvenMode.isEmpty) {
          println(n / 2)
        } else if (secondEvenMode.get._2 > secondOddMode.get._2) {
          println(n - (oddMode._2 + secondEvenMode.get._2))
        } else {
          println(n - (evenMode._2 + secondOddMode.get._2))
        }
      }
    } else {
      println(n - (evenMode._2 + oddMode._2))
    }
  }
}
