#input of int(split by space)
def get_i()
  return gets.chomp.split(" ").map(&:to_i)
end
#input of float(split by space)
def get_f()
  return gets.chomp.split(" ").map(&:to_f)
end
#input of string(split by space)
def get()
  return gets.chomp.split(" ")
end
#input of string(split per one character)
def get_nsp()
  return gets.chomp.split("")
end
#yes or no decision
def yn_judge(bool,y="Yes",n="No")
  return bool ? y : n 
end
#create of array
def array(size1,init=nil,size2=-1)
  if size2==-1
    return Array.new(size1){init}
  else
    return Array.new(size2){Array.new(size1){init}}
  end
end

def max(a,b)
    return a>b ? a : b
end

def min(a,b)
    return a>b ? b : a
end

INF=Float::INFINITY

N=gets.to_i
v=get_i
odd={}
even={}
N.times do|i|
    if (i+1).odd?
      odd[v[i]]=0 if odd[v[i]].nil?
      odd[v[i]]+=1
    else
      even[v[i]]=0 if even[v[i]].nil?
      even[v[i]]+=1
    end
end
odd=odd.sort{|x,y| y[1]<=>x[1]}
even=even.sort{|x,y| y[1]<=>x[1]}
if odd[0][0]!=even[0][0]
    puts N-odd[0][1]-even[0][1]
else
    if odd.size==1 and even.size==1
        puts N/2
    elsif even[0][1]+odd[1][1]>odd[0][1]+even[1][1]
        puts N-even[0][1]-odd[1][1]
    else
        puts N-odd[0][1]-even[1][1]
    end
end