n=io.read("*n","*l")
v={}
for i=1,n do
    x=io.read("*n")
    if i%2==1 then
        if not v[x] then
            v[x]={1,0}
        else
            v[x][1]=v[x][1]+1
        end
    else
        if not v[x] then
            v[x]={0,1}
        else
            v[x][2]=v[x][2]+1
        end
    end
end

table.sort(v, function(a,b)
    return a[1]<b[1]
end)
max=0
omax2=0
for k,_ in pairs(v) do
    max=math.max(max,v[k][1])
    if v[k][1]~=v[k][2] then
        omax2=math.max(omax2,v[k][1])
    end
end

table.sort(v, function(a,b)
    return a[2]<b[2]
end)
emax2=0
for k,_ in pairs(v) do
    if v[k][1]~=v[k][2] then
        emax2=math.max(emax2,v[k][2])
    end
end

print(n-max-math.max(omax2,emax2))