#encoding utf-8

n = int(input())
v = list(int(i) for i in input().split())

even_v = []
odd_v = []

for i in range(n):
    if i%2 == 0:
        odd_v.append(v[i])
    else:
        even_v.append(v[i])

odd_dic = {}
even_dic = {}
for i in range(len(odd_v)):
    if odd_v[i] in odd_dic.keys():
        odd_dic[odd_v[i]] += 1
    else:
        odd_dic[odd_v[i]] = 1

for i in range(len(even_v)):
    if even_v[i] in even_dic.keys():
        even_dic[even_v[i]] += 1
    else:
        even_dic[even_v[i]] = 1


for k, v in sorted(even_dic.items(), key=lambda x: -x[1]):pass
for k, v in sorted(odd_dic.items(), key=lambda x: -x[1]):pass

# odd_dic = sorted(odd_dic.items(),key=lambda x:x[1])
# even_dic = sorted(even_dic.items(),key=lambda x:x[1])

odd_keys = list(odd_dic.keys())
even_keys = list(even_dic.keys())

if odd_keys[0] != even_keys[0]:
    answer = n-int(odd_dic[odd_keys[0]])-int(even_dic[even_keys[0]])
else:
    if len(odd_keys) == 1 and len(even_keys) == 1:
        answer = len(odd_v)
    else:
        answer = mins(int(odd_dic[odd_keys[1]])-int(even_dic[even_keys[0]]), int(odd_dic[odd_keys[0]])-int(even_dic[even_keys[1]]))

print(int(answer))


































# #encoding utf-8
#
# n = int(input())
# v = list(int(i) for i in input().split())
#
#
# v_odd = []
# v_even = []
# for i in range(n):
#     if i%2 == 0:
#         v_odd.append(v[i])
#     else:
#         v_even.append(v[i])
#
# #odd part
# count={}
# for i in range(len(v_odd)):
#     if v_odd[i] in count.keys():
#         count[v_odd[i]] += 1
#     else:
#         count[v_odd[i]] = 1
#
# for k, v in sorted(count.items(), key=lambda x: -x[1]):
#     pass
# keys = list(count.keys())
#
# #even part
# even_count={}
# for i in range(len(v_even)):
#     if v_even[i] in even_count.keys():
#         even_count[v_even[i]] += 1
#     else:
#         even_count[v_even[i]] = 1
#
# # print(even_count)
# for k, v in sorted(even_count.items(), key=lambda x: -x[1]):
#     pass
# even_keys = list(even_count.keys())
#
# if even_keys[0] == keys[0]:
#     if len(keys) == 1 and len(even_keys) == 1:
#         answer = int(n/2)
#     elif len(keys) == 1:
#         answer = int(n/2)-int(even_count[even_keys[1]])
#     elif len(even_keys) == 1:
#         answer = int(n/2)-int(count[keys[1]])
#     else:
#         if int(even_count[even_keys[0]]) > int(count[keys[0]]):
#             answer = n-int(count[keys[1]])-int(even_count[even_keys[0]])
#         elif int(even_count[even_keys[0]]) < int(count[keys[0]]):
#             answer = n-int(count[keys[0]])-int(even_count[even_keys[1]])
#         elif int(even_count[even_keys[0]]) == int(count[keys[0]]):
#             if int(even_count[even_keys[1]]) > int(count[keys[1]]):
#                 answer = n-int(even_count[even_keys[1]])-int(count[keys[0]])
#             elif int(even_count[even_keys[1]]) < int(count[keys[1]]):
#                 answer = n-int(even_count[even_keys[0]])-int(count[keys[1]])
#             else:
#                 answer = n-int(even_count[even_keys[1]])-int(count[keys[0]])
# else:
#     answer = n-int(count[keys[0]])-int(even_count[even_keys[0]])
# print(int(answer))


### FIXED CODE ###

from collections import Counter
def main(n,v):
    # n = int(input())
    # v = list(map(int, input().split()))
    odd = Counter(v[0::2]).most_common(2) + [(0, 0)]
    even = Counter(v[1::2]).most_common(2) + [(0, 0)]

    n_half = int(n / 2)

    if (len(odd) == 1 and len(even) == 1) and odd[0][0] == even[0][0]:
        ans = n_half
    elif odd[0][0] == even[0][0]:
        ans = min(n_half - odd[0][1] + n_half - even[1][1],\
                n_half - odd[1][1] + n_half - even[0][1])
    else:
        ans = n_half - odd[0][1] + n_half - even[0][1]

    print(ans)
    return 0

if __name__ == "__main__":
    n = int(input())
    v = list(map(int, input().split()))
    main(n,v)