#encoding utf-8
def main(n,v):
    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

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

    # 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())

    # for i in range(len(odd_keys)-1):
    #     if odd_dic[odd_keys[i]] == odd_dic[odd_keys[i+1]]:
    #         if odd_keys[i] > odd_keys[i+1]:
    #             tem = odd_keys[i]
    #             odd_keys[i] = odd_keys[i+1]
    #             odd_keys[i+1] = tem
    #
    # for i in range(len(even_keys)-1):
    #     if even_dic[even_keys[i]] == even_dic[even_keys[i+1]]:
    #         if even_keys[i] > even_keys[i+1]:
    #             tem = even_keys[i]
    #             even_keys[i] = even_keys[i+1]
    #             even_keys[i+1] = tem


    # print(even_dic,odd_dic)
    # print(even_keys,odd_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)
        elif len(odd_keys) == 1:
            answer = n-int(odd_dic[odd_keys[0]])-int(even_dic[even_keys[1]])
        elif len(even_keys) == 1:
            answer = n-int(odd_dic[odd_keys[1]])-int(even_dic[even_keys[0]])
        else:
            # if odd_dic[odd_keys[1]] > even_dic[even_keys[1]]:
            #     answer = n-int(odd_dic[odd_keys[1]])-int(even_dic[even_keys[0]])
            # else:
            #     answer = n-int(odd_dic[odd_keys[0]])-int(even_dic[even_keys[1]])
            ans1 = n-int(odd_dic[odd_keys[0]])-int(even_dic[even_keys[1]])
            ans2 = n-int(odd_dic[odd_keys[1]])-int(even_dic[even_keys[0]])
            answer = min(ans1, ans2)
    print(int(answer))
    # return(int(answer))

if __name__ == "__main__":
    main()

### 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)