n = int(eval(input()))

l = list(map(int, input().split()))



if n == 2:

    if l[0] == l[1]:

        print((1))

    else:

        print((0))

else:

    a = []

    b = []

    for i in range(n):

        if i % 2 == 0:

            a.append(l[i])

        else:

            b.append(l[i])



    da = {}

    for e in a:

        if e not in da:

            da[e] = (1,e)

        else:

            da[e] = (da[e][0]+1,da[e][1])



    db = {}

    for e in b:

        if e not in db:

            db[e] = (1,e)

        else:

            db[e] = (db[e][0]+1,db[e][1])



    da[-1] = (0,-1)

    db[-1] = (0,-1)



    la = list(reversed(sorted(list(da.values()))))

    lb = list(reversed(sorted(list(db.values()))))

    #print(la)

    #print(lb)







    if la[0][1] == lb[0][1]:

        ans = n- (la[0][0] + max(la[1][0],lb[1][0]))

    else:

        ans = n - (la[0][0] + lb[0][0])

    print(ans)

n = int(eval(input()))

l = list(map(int, input().split()))



a = []

b = []



for i in range(n):

    if i % 2 == 0:

        a.append(l[i])

    else:

        b.append(l[i])



def createMyList(li):

    d = {-1:(0,-1)}

    for e in li:

        if e not in d:

            d[e] = (1,e)

        else:

            d[e] = (d[e][0] + 1, d[e][1])

    return list(reversed(sorted(list(d.values()))))



la = createMyList(a)

lb = createMyList(b)

#print(la)

#print(lb)



if la[0][1] == lb[0][1]:

    ans = n- max(lb[0][0] + la[1][0], la[0][0] +lb[1][0])

else:

    ans = n - (la[0][0] + lb[0][0])

print(ans)

n = int(eval(input()))
l = list(map(int, input().split()))
if n == 2:
    if l[0] == l[1]:
        print((1))
    else:
        print((0))
else:
    a = []
    b = []
    for i in range(n):
        if i % 2 == 0:
            a.append(l[i])
        else:
            b.append(l[i])
    da = {}
    for e in a:
        if e not in da:
            da[e] = (1, e)
        else:
            da[e] = (da[e][0] + 1, da[e][1])
    db = {}
    for e in b:
        if e not in db:
            db[e] = (1, e)
        else:
            db[e] = (db[e][0] + 1, db[e][1])
    da[-1] = (0, -1)
    db[-1] = (0, -1)
    la = list(reversed(sorted(list(da.values()))))
    lb = list(reversed(sorted(list(db.values()))))
    # print(la)
    # print(lb)
    if la[0][1] == lb[0][1]:
        ans = n - (la[0][0] + max(la[1][0], lb[1][0]))
    else:
        ans = n - (la[0][0] + lb[0][0])
    print(ans)

n = int(eval(input()))
l = list(map(int, input().split()))
a = []
b = []
for i in range(n):
    if i % 2 == 0:
        a.append(l[i])
    else:
        b.append(l[i])


def createMyList(li):
    d = {-1: (0, -1)}
    for e in li:
        if e not in d:
            d[e] = (1, e)
        else:
            d[e] = (d[e][0] + 1, d[e][1])
    return list(reversed(sorted(list(d.values()))))


la = createMyList(a)
lb = createMyList(b)
# print(la)
# print(lb)
if la[0][1] == lb[0][1]:
    ans = n - max(lb[0][0] + la[1][0], la[0][0] + lb[1][0])
else:
    ans = n - (la[0][0] + lb[0][0])
print(ans)

-if n == 2: -    if l[0] == l[1]: -        print((1)) +a = [] +b = [] +for i in range(n): +    if i % 2 == 0: +        a.append(l[i]) -        print((0)) +        b.append(l[i]) + + +def createMyList(li): +    d = {-1: (0, -1)} +    for e in li: +        if e not in d: +            d[e] = (1, e) +        else: +            d[e] = (d[e][0] + 1, d[e][1]) +    return list(reversed(sorted(list(d.values())))) + + +la = createMyList(a) +lb = createMyList(b) +# print(la) +# print(lb) +if la[0][1] == lb[0][1]: +    ans = n - max(lb[0][0] + la[1][0], la[0][0] + lb[1][0]) -    a = [] -    b = [] -    for i in range(n): -        if i % 2 == 0: -            a.append(l[i]) -        else: -            b.append(l[i]) -    da = {} -    for e in a: -        if e not in da: -            da[e] = (1, e) -        else: -            da[e] = (da[e][0] + 1, da[e][1]) -    db = {} -    for e in b: -        if e not in db: -            db[e] = (1, e) -        else: -            db[e] = (db[e][0] + 1, db[e][1]) -    da[-1] = (0, -1) -    db[-1] = (0, -1) -    la = list(reversed(sorted(list(da.values())))) -    lb = list(reversed(sorted(list(db.values())))) -    # print(la) -    # print(lb) -    if la[0][1] == lb[0][1]: -        ans = n - (la[0][0] + max(la[1][0], lb[1][0])) -    else: -        ans = n - (la[0][0] + lb[0][0]) -    print(ans) +    ans = n - (la[0][0] + lb[0][0]) +print(ans)