
n = io.read("*n")
v1 = {}
v2 = {}
for i = 1, n do
	x = io.read("*n")
	if i % 2 == 1 then
		v1[x] = v1[x] and v1[x]+1 or 1
	else
		v2[x] = v2[x] and v2[x]+1 or 1
	end
end

v1[-1] = 0
v2[-1] = 0
s1 = {}
s2 = {}
for k, v in pairs(v1) do
	s1[#s1+1] = {k, v}
end
for k, v in pairs(v2) do
	s2[#s2+1] = {k, v}
end
table.sort(s1, function(a, b) return a[2] > b[2] end)
table.sort(s2, function(a, b) return a[2] > b[2] end)
-- print_r(s1)
-- print_r(s2)

if s1[1][1] ~= s2[1][1] then
	print(n - s1[1][2] - s2[1][2])
else
	print(n - math.max(s1[1][2]+s2[2][2], s1[2][2]+s2[1][2]))
end