object Main{
  def main(args:Array[String]):Unit={
    var n = readInt
    var nums = readLine.split(" ").map(x => x.toInt)
    var recordR:Map[Int,Int] = Map()
    var recordL:Map[Int,Int] = Map()
    for(i <- 0 until nums.length){
      if(i%2==0){
        var tmp = recordL.getOrElse(nums(i),0)
        tmp+=1
        recordL +=(nums(i),tmp)
      }else{
        var tmp = recordR.getOrElse(nums(i),0)
        tmp+=1
        recordR +=(nums(i),tmp)
      }
    }
    var sortedL = recordL.keySet.toSeq.sortBy(_._2).toArray
    var sortedR = recordR.keySet.toSeq.sortBy(_._2).toArray
    var res = 0
    if(sortedL(0)!=sortedR(0)){
      res += nums.length/2-recordL.getOrElse(sortedL(0),0)
      res += nums.length/2-recordR.getOrElse(sortedR(0),0)
      println(res)
    }else{
      if(sortedL.getOrElse(sorted(0),0) > sortedR.getOrElse(sorted(0),0)){
        res += nums.length/2 - recordL.getOrElse(sorted(0),0)
        res += nums.length/2 - recordR.getOrElse(sorted(1),0)
        println(res)
      }else{
        res += nums.length/2 - recordL.getOrElse(sorted(1),0)
        res += nums.length/2 - recordR.getOrElse(sorted(0),0)
      }
    }
  }
}