n = gets.to_i
v = gets.chomp.split(" ").map(&:to_i)
odd = Hash.new(0)
even = Hash.new(0)
n.times do |i|
  if (i+1).odd?
    odd[v[i]] += 1
  else
    even[v[i]] += 1
  end
end
odd_max = 0
odd_max_n = 0
odd.each do |k,v|
  if v > odd_max
    odd_max = v
    odd_max_n = k
  end
end
even_max = 0
even_max_n = 0
even.each do |k,v|
  if v > even_max
    even_max = v
    even_max_n = k
  end
end
if odd_max_n != even_max_n
  puts n - odd_max - even_max
else
  odd_max2 = 0
  odd_max2_n = 0
  odd.each do |k,v|
    if v > odd_max2 && odd_max_n != k
      odd_max2 = v
      odd_max2_n = k
    end
  end
  even_max2 = 0
  even_max2_n = 0
  even.each do |k,v|
    if v > even_max2 && even_max_n != k
      even_max2 = v
      even_max2_n = k
    end
  end
  if odd_max2 < even_max2
    puts n - odd_max - even_max2
  else
    puts n - odd_max2 - even_max
  end
end