from collections import Counter as C

n = int(eval(input()))

v = [int(a) for a in input().split()]



k1 = C(v[::2]).most_common()[0][0]

v1 = C(v[::2]).most_common()[0][1]



if v1 == n/2:

    k2 = 0

    v2 = 0

else:

    k2 = C(v[::2]).most_common()[1][0]

    v2 = C(v[::2]).most_common()[1][1]



k3 = C(v[1::2]).most_common()[0][0]

v3 = C(v[1::2]).most_common()[0][1]



if v3 == n/2:

    k4 = 0

    v4 = 0

else:

    k4 = C(v[1::2]).most_common()[1][0]

    v4 = C(v[1::2]).most_common()[1][1]



if k1 != k3:

    print((n - v1 - v3))

else:

    print((min(n - v1 - v4, n - v2 - v3)))
from collections import Counter as C

n = int(eval(input()))

v = [int(a) for a in input().split()]



a=C(v[::2])

b=C(v[1::2])

a[0]=b[0]=0

a=a.most_common()

b=b.most_common()

if a[0][0] != b[0][0]:

    print((n-a[0][1]-b[0][1]))

else:

    print((min(n-a[1][1]-b[0][1],n-a[0][1]-b[1][1])))

from collections import Counter as C

n = int(eval(input()))
v = [int(a) for a in input().split()]
k1 = C(v[::2]).most_common()[0][0]
v1 = C(v[::2]).most_common()[0][1]
if v1 == n / 2:
    k2 = 0
    v2 = 0
else:
    k2 = C(v[::2]).most_common()[1][0]
    v2 = C(v[::2]).most_common()[1][1]
k3 = C(v[1::2]).most_common()[0][0]
v3 = C(v[1::2]).most_common()[0][1]
if v3 == n / 2:
    k4 = 0
    v4 = 0
else:
    k4 = C(v[1::2]).most_common()[1][0]
    v4 = C(v[1::2]).most_common()[1][1]
if k1 != k3:
    print((n - v1 - v3))
else:
    print((min(n - v1 - v4, n - v2 - v3)))

from collections import Counter as C

n = int(eval(input()))
v = [int(a) for a in input().split()]
a = C(v[::2])
b = C(v[1::2])
a[0] = b[0] = 0
a = a.most_common()
b = b.most_common()
if a[0][0] != b[0][0]:
    print((n - a[0][1] - b[0][1]))
else:
    print((min(n - a[1][1] - b[0][1], n - a[0][1] - b[1][1])))

-k1 = C(v[::2]).most_common()[0][0] -v1 = C(v[::2]).most_common()[0][1] -if v1 == n / 2: -    k2 = 0 -    v2 = 0 +a = C(v[::2]) +b = C(v[1::2]) +a[0] = b[0] = 0 +a = a.most_common() +b = b.most_common() +if a[0][0] != b[0][0]: +    print((n - a[0][1] - b[0][1])) -    k2 = C(v[::2]).most_common()[1][0] -    v2 = C(v[::2]).most_common()[1][1] -k3 = C(v[1::2]).most_common()[0][0] -v3 = C(v[1::2]).most_common()[0][1] -if v3 == n / 2: -    k4 = 0 -    v4 = 0 -else: -    k4 = C(v[1::2]).most_common()[1][0] -    v4 = C(v[1::2]).most_common()[1][1] -if k1 != k3: -    print((n - v1 - v3)) -else: -    print((min(n - v1 - v4, n - v2 - v3))) +    print((min(n - a[1][1] - b[0][1], n - a[0][1] - b[1][1])))