object Main extends App {
	val n = scala.io.StdIn.readInt
	val a = scala.io.StdIn.readLine.split(" ").map(_.toInt)

	var mapOdd  = Map[Int, Int]()
	var mapEven = Map[Int, Int]()

	for(i<-0 until n by 2){
		mapOdd.get(a(i)) match {
			case None    => mapOdd = mapOdd + (a(i)->1)
			case Some(z) => mapOdd = mapOdd.updated(a(i), z+1)
		}
	}

	for(i<-1 until n by 2){
		mapEven.get(a(i)) match {
			case None    => mapEven = mapEven + (a(i)->1)
			case Some(z) => mapEven = mapEven.updated(a(i), z+1)
		}
	}

	val odd  = mapOdd.toArray.sortBy(_._2).reverse
	val even = mapEven.toArray.sortBy(_._2).reverse

	val o1 = odd(0)._1
	val e1 = even(0)._1
	var o2 = -1
	var e2 = -1

	if(odd.size  >= 2) o2 = odd(1)._1
	if(even.size >= 2) e2 = even(1)._1

	if(o1 != e1) println(n - mapOdd.get(o1).get - mapEven.get(e1).get)
	else {
		val t1 = n - mapOdd.get(o1).get - mapEven.getOrElse(e2, 0)
		val t2 = n - mapOdd.getOrElse(o2, 0)- mapEven.get(e1).get
		println(math.min(t1, t2))
	}





} 
