n = gets.chomp.to_i
v = gets.chomp.split(" ").map(&:to_i)

if v.all?{|i| i==v[0]}
    puts n/2
    exit
end

even = Hash.new(0)
odd = Hash.new(0)

v.each_with_index do |e, i|
    if i % 2 != 0
        odd[e.to_s] += 1
    else
        even[e.to_s] += 1
    end
end

puts n - even.max{|x, y| x[1] <=> y[1]}[1] - odd.max{|x, y| x[1] <=> y[1]}[1]