import collections

N = int(eval(input()))

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

V_even = V[::2]

V_odd = V[1::2]

V_even_counter = collections.Counter(V_even)

V_odd_counter = collections.Counter(V_odd)

if V_even_counter.most_common()[0][0] != V_odd_counter.most_common()[0][0]:

    ans = N - V_even_counter.most_common()[0][1] - V_odd_counter.most_common()[0][1]

else:

    if len(V_even_counter) > 1 and len(V_odd_counter) > 1:

        ans = N - max(V_even_counter.most_common()[0][1] + V_odd_counter.most_common()[1][1],\

            V_even_counter.most_common()[1][1] + V_odd_counter.most_common()[0][1])

    elif len(V_even_counter) == 1 and len(V_odd_counter) > 1:

        ans = N - V_even_counter.most_common()[0][1] - V_odd_counter.most_common()[1][1]

    elif len(V_even_counter) > 1 and len(V_odd_counter) == 1:

        ans = N - V_even_counter.most_common()[1][1] + V_odd_counter.most_common()[0][1]

    else:

        ans = N//2

print(ans)

n = int(eval(input()))

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

v1 = v[::2]

v2 = v[1::2]

from collections import Counter

cv1 = Counter(v1).most_common()

cv2 = Counter(v2).most_common()

cv1.append((0,0))

cv2.append((0,0))



if cv1[0][0] == cv2[0][0]:

    ans = n - max(cv1[0][1] + cv2[1][1], cv1[1][1] + cv2[0][1])

else:

    ans = n - cv1[0][1] - cv2[0][1]

print(ans)

import collections

N = int(eval(input()))
V = list(map(int, input().split()))
V_even = V[::2]
V_odd = V[1::2]
V_even_counter = collections.Counter(V_even)
V_odd_counter = collections.Counter(V_odd)
if V_even_counter.most_common()[0][0] != V_odd_counter.most_common()[0][0]:
    ans = N - V_even_counter.most_common()[0][1] - V_odd_counter.most_common()[0][1]
else:
    if len(V_even_counter) > 1 and len(V_odd_counter) > 1:
        ans = N - max(
            V_even_counter.most_common()[0][1] + V_odd_counter.most_common()[1][1],
            V_even_counter.most_common()[1][1] + V_odd_counter.most_common()[0][1],
        )
    elif len(V_even_counter) == 1 and len(V_odd_counter) > 1:
        ans = N - V_even_counter.most_common()[0][1] - V_odd_counter.most_common()[1][1]
    elif len(V_even_counter) > 1 and len(V_odd_counter) == 1:
        ans = N - V_even_counter.most_common()[1][1] + V_odd_counter.most_common()[0][1]
    else:
        ans = N // 2
print(ans)

n = int(eval(input()))
v = list(map(int, input().split()))
v1 = v[::2]
v2 = v[1::2]
from collections import Counter

cv1 = Counter(v1).most_common()
cv2 = Counter(v2).most_common()
cv1.append((0, 0))
cv2.append((0, 0))
if cv1[0][0] == cv2[0][0]:
    ans = n - max(cv1[0][1] + cv2[1][1], cv1[1][1] + cv2[0][1])
else:
    ans = n - cv1[0][1] - cv2[0][1]
print(ans)

-import collections +n = int(eval(input())) +v = list(map(int, input().split())) +v1 = v[::2] +v2 = v[1::2] +from collections import Counter -N = int(eval(input())) -V = list(map(int, input().split())) -V_even = V[::2] -V_odd = V[1::2] -V_even_counter = collections.Counter(V_even) -V_odd_counter = collections.Counter(V_odd) -if V_even_counter.most_common()[0][0] != V_odd_counter.most_common()[0][0]: -    ans = N - V_even_counter.most_common()[0][1] - V_odd_counter.most_common()[0][1] +cv1 = Counter(v1).most_common() +cv2 = Counter(v2).most_common() +cv1.append((0, 0)) +cv2.append((0, 0)) +if cv1[0][0] == cv2[0][0]: +    ans = n - max(cv1[0][1] + cv2[1][1], cv1[1][1] + cv2[0][1]) -    if len(V_even_counter) > 1 and len(V_odd_counter) > 1: -        ans = N - max( -            V_even_counter.most_common()[0][1] + V_odd_counter.most_common()[1][1], -            V_even_counter.most_common()[1][1] + V_odd_counter.most_common()[0][1], -        ) -    elif len(V_even_counter) == 1 and len(V_odd_counter) > 1: -        ans = N - V_even_counter.most_common()[0][1] - V_odd_counter.most_common()[1][1] -    elif len(V_even_counter) > 1 and len(V_odd_counter) == 1: -        ans = N - V_even_counter.most_common()[1][1] + V_odd_counter.most_common()[0][1] -    else: -        ans = N // 2 +    ans = n - cv1[0][1] - cv2[0][1]