n = gets.to_i
ary = gets.strip.split.map(&:to_i)
if ary.uniq.size != 1
  odd = []
  even = []
  n.times do |i|
    if i%2==0
      odd << ary[i]
    else
      even << ary[i]
    end
  end
  rec1 = Array.new(10**5,0)
  rec2 = Array.new(10**5,0)
  for i in 0..n/2-1
    rec1[odd[i]-1] += 1
  end
  for i in 0..n/2-1
    rec2[even[i]-1] += 1
  end
  puts n-rec1.max-rec2.max
else
  puts n/2
end