local a = io.read("*n")
local t = {}
for i=1,a do
    table.insert(t,io.read("*n"))
end

function test(t)
    local dic1 = {}
    local dic2 = {}
    for i,v in ipairs(t) do
        if i % 2 == 1 then
            if dic1[v] then
                dic1[v] = dic1[v]+1
            else
                dic1[v] = 1
            end
        else
            if dic2[v] then
                dic2[v] = dic2[v]+1
            else
                dic2[v] = 1
            end
        end
    end
    local max1,max2 = 0,0
    local tag1,tag2 = 0,0
    for k,v in pairs(dic1) do
        max1 = math.max(max1,v)
        if v == max1 then
            tag1 = k
        end
    end
    for k,v in pairs(dic2) do
        max2 = math.max(max2,v)
        if v == max2 then
            tag2 = k
        end
    end
    local num1,num2 = 0,0
    for k,v in pairs(dic1) do
       if k ~= tag1 then
            num1 = num1 + v
       end
    end
    for k,v in pairs(dic2) do
       if k ~= tag2 then
            num2 = num2 + v
       end
    end
    if tag1 == tag2 then
        print(math.min(max1,max2))
    else
        print(num1+num2)
    end

end
test(t)