from collections import *



N = int(eval(input()))

v_list = input().split()



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

    print((len(v_list) // 2))

    exit()



v1_count_list = Counter(v_list[::2]).most_common()

v2_count_list = Counter(v_list[1::2]).most_common()



if v1_count_list[0][0] != v2_count_list[0][0]:

    leave_value = v1_count_list[0][1] + v2_count_list[0][1]

else:

    leave_value = max(v1_count_list[1][1] + v2_count_list[0][1], v1_count_list[0][1] + v2_count_list[1][1])

print((len(v_list) - leave_value))
from collections import *



N = eval(input())

v_list = input().split()



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

    print((len(v_list) // 2))

    exit()



v1_count_list = Counter(v_list[::2]).most_common(2)

v2_count_list = Counter(v_list[1::2]).most_common(2)



if v1_count_list[0][0] != v2_count_list[0][0]:

    leave_value = v1_count_list[0][1] + v2_count_list[0][1]

else:

    leave_value = max(v1_count_list[1][1] + v2_count_list[0][1], v1_count_list[0][1] + v2_count_list[1][1])

print((len(v_list) - leave_value))
from collections import *

N = int(eval(input()))
v_list = input().split()
if len(set(v_list)) == 1:
    print((len(v_list) // 2))
    exit()
v1_count_list = Counter(v_list[::2]).most_common()
v2_count_list = Counter(v_list[1::2]).most_common()
if v1_count_list[0][0] != v2_count_list[0][0]:
    leave_value = v1_count_list[0][1] + v2_count_list[0][1]
else:
    leave_value = max(
        v1_count_list[1][1] + v2_count_list[0][1],
        v1_count_list[0][1] + v2_count_list[1][1],
    )
print((len(v_list) - leave_value))

from collections import *

N = eval(input())
v_list = input().split()
if len(set(v_list)) == 1:
    print((len(v_list) // 2))
    exit()
v1_count_list = Counter(v_list[::2]).most_common(2)
v2_count_list = Counter(v_list[1::2]).most_common(2)
if v1_count_list[0][0] != v2_count_list[0][0]:
    leave_value = v1_count_list[0][1] + v2_count_list[0][1]
else:
    leave_value = max(
        v1_count_list[1][1] + v2_count_list[0][1],
        v1_count_list[0][1] + v2_count_list[1][1],
    )
print((len(v_list) - leave_value))

-N = int(eval(input())) +N = eval(input()) -v1_count_list = Counter(v_list[::2]).most_common() -v2_count_list = Counter(v_list[1::2]).most_common() +v1_count_list = Counter(v_list[::2]).most_common(2) +v2_count_list = Counter(v_list[1::2]).most_common(2)