from collections import Counter



n = int(eval(input()))

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



"""数字が1種類の場合は半分を書き換える必要が確定"""

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

    print((len(v) // 2))

    exit()



"""要素出現数を集計"""

odd_count = Counter(v[1::2])

even_count = Counter(v[::2])



"""一番多く出現する2つの数字を探す"""

max_hit = 0

odd = None

even = None

for odd_val, odd_hit in odd_count.most_common(5):

    # if max_hit > odd_hit:

    #     break  # もう最大値は更新されないので打ち止め

    for even_val, even_hit in even_count.most_common(5):

        # if max_hit > even_hit:

        #     break  # もう最大値は更新されないので打ち止め

        if odd_val == even_val:

            continue  # 数字は2種類ないとダメ

        if odd_hit + even_hit > max_hit:

            max_hit = odd_hit + even_hit

            odd = odd_val

            even = even_val



"""一致していない要素が書き換え必要回数"""

print((len(v) - max_hit))

from collections import Counter



n = int(eval(input()))

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



"""数字が1種類の場合は半分を書き換える必要が確定"""

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

    print((len(v) // 2))

    exit()



"""要素出現数を集計"""

odd_count = Counter(v[1::2])

even_count = Counter(v[::2])



"""一番多く出現する2つの数字を探す"""

max_hit = 0

odd = None

even = None

for odd_val, odd_hit in odd_count.most_common(2):

    for even_val, even_hit in even_count.most_common(2):

        if odd_val == even_val:

            continue  # 奇数と偶数は同じ数字じゃだめ

        if odd_hit + even_hit > max_hit:

            max_hit = odd_hit + even_hit

            odd = odd_val

            even = even_val



"""一致していない要素が書き換え必要回数"""

print((len(v) - max_hit))

from collections import Counter

n = int(eval(input()))
v = list(map(int, input().split()))
"""数字が1種類の場合は半分を書き換える必要が確定"""
if len(set(v)) == 1:
    print((len(v) // 2))
    exit()
"""要素出現数を集計"""
odd_count = Counter(v[1::2])
even_count = Counter(v[::2])
"""一番多く出現する2つの数字を探す"""
max_hit = 0
odd = None
even = None
for odd_val, odd_hit in odd_count.most_common(5):
    # if max_hit > odd_hit:
    #     break  # もう最大値は更新されないので打ち止め
    for even_val, even_hit in even_count.most_common(5):
        # if max_hit > even_hit:
        #     break  # もう最大値は更新されないので打ち止め
        if odd_val == even_val:
            continue  # 数字は2種類ないとダメ
        if odd_hit + even_hit > max_hit:
            max_hit = odd_hit + even_hit
            odd = odd_val
            even = even_val
"""一致していない要素が書き換え必要回数"""
print((len(v) - max_hit))

from collections import Counter

n = int(eval(input()))
v = list(map(int, input().split()))
"""数字が1種類の場合は半分を書き換える必要が確定"""
if len(set(v)) == 1:
    print((len(v) // 2))
    exit()
"""要素出現数を集計"""
odd_count = Counter(v[1::2])
even_count = Counter(v[::2])
"""一番多く出現する2つの数字を探す"""
max_hit = 0
odd = None
even = None
for odd_val, odd_hit in odd_count.most_common(2):
    for even_val, even_hit in even_count.most_common(2):
        if odd_val == even_val:
            continue  # 奇数と偶数は同じ数字じゃだめ
        if odd_hit + even_hit > max_hit:
            max_hit = odd_hit + even_hit
            odd = odd_val
            even = even_val
"""一致していない要素が書き換え必要回数"""
print((len(v) - max_hit))

-for odd_val, odd_hit in odd_count.most_common(5): -    # if max_hit > odd_hit: -    #     break  # もう最大値は更新されないので打ち止め -    for even_val, even_hit in even_count.most_common(5): -        # if max_hit > even_hit: -        #     break  # もう最大値は更新されないので打ち止め +for odd_val, odd_hit in odd_count.most_common(2): +    for even_val, even_hit in even_count.most_common(2): -            continue  # 数字は2種類ないとダメ +            continue  # 奇数と偶数は同じ数字じゃだめ