let n = Int(readLine()!)!
let v = readLine()!.characters.split(" ").map{Int(String($0))!}
var num = (0..<2).map{_ in (0..<100000).map{_ in 0}}
for (i, vi) in v.enumerate() {
    num[i%2][vi-1] += 1
}
let sortedNum = num.map{$0.sort(>)}
let maxNum = (0..<2).map{sortedNum[$0][0]}
if num[0].indexOf(maxNum[0]) != num[1].indexOf(maxNum[1]) {
    print(n - (maxNum[0] + maxNum[1]))
} else {
    print(n - max(maxNum[0]+sortedNum[1][1], sortedNum[0][1]+maxNum[1]))
}