from collections import Counter



def solve(n, V):

    if len(set(V)) == 1:

        return n // 2

    return min(

        n - oc - ec

        for o, oc in Counter(V[0::2]).most_common(2)

        for e, ec in Counter(V[1::2]).most_common(2)

        if o != e

    )



_n = int(eval(input()))

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

print((solve(_n, _V)))

from collections import Counter



def solve(n, V):

    if V.count(V[0]) == n:

        return n // 2

    return min(

        n - oc - ec

        for o, oc in Counter(V[0::2]).most_common(2)

        for e, ec in Counter(V[1::2]).most_common(2)

        if o != e

    )



_n = int(eval(input()))

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

print((solve(_n, _V)))

from collections import Counter


def solve(n, V):
    if len(set(V)) == 1:
        return n // 2
    return min(
        n - oc - ec
        for o, oc in Counter(V[0::2]).most_common(2)
        for e, ec in Counter(V[1::2]).most_common(2)
        if o != e
    )


_n = int(eval(input()))
_V = list(map(int, input().split()))
print((solve(_n, _V)))

from collections import Counter


def solve(n, V):
    if V.count(V[0]) == n:
        return n // 2
    return min(
        n - oc - ec
        for o, oc in Counter(V[0::2]).most_common(2)
        for e, ec in Counter(V[1::2]).most_common(2)
        if o != e
    )


_n = int(eval(input()))
_V = list(map(int, input().split()))
print((solve(_n, _V)))

-    if len(set(V)) == 1: +    if V.count(V[0]) == n: