local n = io.read("*n", "*l")
local str = io.read()
local t = {}
for strnum in string.gmatch(str, "%d+") do
  table.insert(t, tonumber(strnum))
end
local even = {}
local odd = {}
for i = 1, n, 2 do
  if(odd[t[i]] == nil) then odd[t[i]] = 1 else odd[t[i]] = odd[t[i]] + 1 end
  if(even[t[i + 1]] == nil) then even[t[i + 1]] = 1 else even[t[i + 1]] = even[t[i + 1]] + 1 end
end
if(n == 2) then
  if(t[1] == t[2]) then print(1) else print(0) end
else
  local evall, odall = {}, {}
  for k, v in pairs(even) do
    local t = {}
    t.key, t.val = k, v
    table.insert(evall, t)
  end
  table.sort(evall, function(x, y) return x.val > y.val end)
  for k, v in pairs(odd) do
    local t = {}
    t.key, t.val = k, v
    table.insert(odall, t)
  end
  table.sort(odall, function(x, y) return x.val > y.val end)
  if(evall[1].key ~= odall[1].key) then
    print(n - evall[1].val - odall[1].val)
  else
    if(evall[2] == nil and odall[2] == nil) then
      print(n / 2)
    elseif(evall[2] == nil) then
      print(n - evall[1].val - odall[2].val)
    elseif(odall[2] == nil) then
      print(n - evall[2].val - odall[1].val)
    else
      if(evall[2].val < odall[2].val) then
        print(n - evall[1].val - odall[2].val)
      else
        print(n - evall[2].val - odall[1].val)
      end
    end
  end
end
