n=gets.to_i
s=gets.split.map &:to_i
h1=Hash.new(0);h2=Hash.new(0)
for i in 0...n
 i.even? ? h1[s[i]]+=1:h2[s[i]]+=1
end
ans1=h1.sort_by{|k,v|-v}.shift(2)
ans2=h2.sort_by{|k,v|-v}.shift(2)
ans1 << [0,0]
ans2 << [0,0]
if ans1[0][0]==ans2[0][0]
  puts n-([ans1[0][1]+ans1[1][1],ans2[0][1]+ans2[1][1]].max)
else
  puts n-ans1[0][1]-ans2[0][1]
end
