from collections import Counter



iN = int(eval(input()))

aV = [int(_) for _ in input().split()]



oV0 = Counter(aV[0::2]).most_common()

oV1 = Counter(aV[1::2]).most_common()

oV0 += [(0,0)]

oV1 += [(0,0)]



if oV0[0][0] != oV1[0][0] :

    print((iN - oV0[0][1] - oV1[0][1]))

else:

    print((iN - max(oV0[0][1],oV1[0][1]) - max(oV0[1][1],oV1[1][1])))

from collections import Counter



iN = int(eval(input()))

aV = [int(_) for _ in input().split()]



oV0 = Counter(aV[0::2]).most_common(2)

oV1 = Counter(aV[1::2]).most_common(2)

oV0 += [(0,0)]

oV1 += [(0,0)]



if oV0[0][0] != oV1[0][0] :

    print((iN - oV0[0][1] - oV1[0][1]))

else:

    print((iN - max(oV0[0][1],oV1[0][1]) - max(oV0[1][1],oV1[1][1])))

from collections import Counter

iN = int(eval(input()))
aV = [int(_) for _ in input().split()]
oV0 = Counter(aV[0::2]).most_common()
oV1 = Counter(aV[1::2]).most_common()
oV0 += [(0, 0)]
oV1 += [(0, 0)]
if oV0[0][0] != oV1[0][0]:
    print((iN - oV0[0][1] - oV1[0][1]))
else:
    print((iN - max(oV0[0][1], oV1[0][1]) - max(oV0[1][1], oV1[1][1])))

from collections import Counter

iN = int(eval(input()))
aV = [int(_) for _ in input().split()]
oV0 = Counter(aV[0::2]).most_common(2)
oV1 = Counter(aV[1::2]).most_common(2)
oV0 += [(0, 0)]
oV1 += [(0, 0)]
if oV0[0][0] != oV1[0][0]:
    print((iN - oV0[0][1] - oV1[0][1]))
else:
    print((iN - max(oV0[0][1], oV1[0][1]) - max(oV0[1][1], oV1[1][1])))

-oV0 = Counter(aV[0::2]).most_common() -oV1 = Counter(aV[1::2]).most_common() +oV0 = Counter(aV[0::2]).most_common(2) +oV1 = Counter(aV[1::2]).most_common(2)