import math
import sys
from itertools import accumulate
from functools import reduce
from collections import Counter
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

sys.setrecursionlimit(10000)

mod = 1000000007

"""
# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]

# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())

## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき
"""

if __name__ == "__main__":
    N = int(sys.stdin.readline())
    L = list(map(int, sys.stdin.readline().split()))
    eL = Counter([L[i] for i in range(N) if i % 2 != 0])
    oL = Counter([L[i] for i in range(N) if i % 2 == 0])
    eLc = eL.most_common() # even list most common
    oLc = oL.most_common() # odd  list most common

    if eLc[0][0] != oLc[0][0]:
        print(N - (eLc[0][1] + oLc[0][1]))
    else:
        if eLc[0][1] == 1 or oLc[0][1] == 1:
            print(N // 2)
        else:
            print(min(N - (eLc[1][1] + oLc[0][1]), N - (eLc[0][1] + oLc[1][1])))

"""
if len(eLc) == 1 or len(oLc) == 1:
    if len(eLc) == 1 and len(oLc) == 1:
        if eLc[0] != oLc[0]:
            print(0)
        else:
            print(l)
    elif len(eLc) == 1:
        print((l - oLc[0][1]))
    else:
        print((l - eLc[0][1]))
else:
    if eLc[0][0] != oLc[0][0]:
        print((l - eLc[0][1]) + (l - oLc[0][1]))
    else:
        print(min((l - eLc[1][1]) + (l - oLc[0][1]), (l - eLc[0][1]) + (l - oLc[1][1])))
"""


### FIXED CODE ###

import math
import sys
from itertools import accumulate
from functools import reduce
from collections import Counter
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

sys.setrecursionlimit(10000)

mod = 1000000007

"""
# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]

# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())

## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき
"""

if __name__ == "__main__":
    N = int(sys.stdin.readline())
    L = list(map(int, sys.stdin.readline().split()))
    l = N // 2
    eL = Counter([L[i] for i in range(N) if i % 2 != 0])
    oL = Counter([L[i] for i in range(N) if i % 2 == 0])
    eLc = eL.most_common() # even list most common
    oLc = oL.most_common() # odd  list most common

    if len(eLc) == 1 or len(oLc) == 1:
        if len(eLc) == 1 and len(oLc) == 1:
            if eLc[0] != oLc[0]:
                print(0)
            else:
                print(l)
        elif len(eLc) == 1:
            print((l - oLc[0][1]))
        else:
            print((l - eLc[0][1]))
    else:
        if eLc[0][0] != oLc[0][0]:
            print((l - eLc[0][1]) + (l - oLc[0][1]))
        else:
            print(min((l - eLc[1][1]) + (l - oLc[0][1]), (l - eLc[0][1]) + (l - oLc[1][1])))