import scala.collection.immutable.ListMap
object Main {
  def main(args: Array[String]) {
      var flag = true
      var array_length = 0
      var odd_nums:Array[Int]  = Array.empty
      var even_nums:Array[Int] = Array.empty
      for(line <- io.Source.stdin.getLines) {
        if (flag) {
          array_length = line.toInt/2
          flag = false
        }
        else {
          val factors = line.split(" ").map{_.toInt}
          for(i <- 0 until factors.length) {
            if(i%2 == 0) {
              odd_nums = odd_nums :+ factors(i)
            }
            else {
              even_nums = even_nums :+ factors(i)
            }
          }
        }
      }

      var odd_map  = ListMap(odd_nums.groupBy(identity).mapValues(_.size).toSeq.sortWith(_._1 > _._1):_*)
      var even_map = ListMap(even_nums.groupBy(identity).mapValues(_.size).toSeq.sortWith(_._1 > _._1):_*)

      var odd_max_num  = 0
      var even_max_num = 0
      var check = true

      while(check) {
        val (odd_key, odd_value)   = odd_map.head
        val (even_key, even_value) = even_map.head

        if(odd_key == even_key) {
          if(odd_value > even_value) {
            odd_max_num  = odd_value
            even_max_num = even_map.tail.head._2  
            check = false
          }
          else if(odd_value < even_value){
            odd_max_num  = odd_map.tail.head._2
            even_max_num = even_value
            check = false
          }
        }
        else {
          odd_max_num  = odd_value
          even_max_num = even_value
          check = false
        }
        odd_map  = odd_map.tail
        even_map = even_map.tail
      }

      println((array_length - odd_max_num) + (array_length - even_max_num))
  }
}
