def main():

  n = int(eval(input()))

  v = input_list()

  evens = []

  odds = []

  vs = v[:]

  kind = len(set(vs))

  if kind == 1:

    print((n//2))

    exit(0)

  

  for i, vv in enumerate(v):

    if i % 2 == 0:

      evens.append(vv)

    else:

      odds.append(vv)

  ec = collections.Counter(evens)

  oc = collections.Counter(odds)

  m = n//2

  

  ans = 0

  em = ec.most_common()

  om = oc.most_common()

  if em[0][0] == om[0][0]:

    p1 = m-em[0][1] + m-om[1][1]

    p2 = m-em[1][1] + m-om[0][1]

    print((min(p1,p2)))

  else:

    print((m-em[0][1] + m-om[0][1]))

  

def input_list():

  return list(map(int, input().split()))



def input_list_str():

  return list(map(str, input().split()))



def lcm_base(x, y):

    return (x * y) // fractions.gcd(x, y)



def lcm_list(numbers):

    return reduce(lcm_base, numbers, 1)



def gcd(*numbers):

    return reduce(fractions.gcd, numbers)



def gcd_list(numbers):

    return reduce(fractions.gcd, numbers)



# 2で割り切れる回数

def divide_two(arg):

  c = 0

  while True:

    if c >= 2:

      break

    if arg % 2 != 0:

      break

    arg //= 2

    c += 1

  return c 



import math

import fractions

import collections

from functools import reduce

main()
import math

import fractions

from functools import reduce





def main():

    n = int(eval(input()))

    a = input_list()

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

        print((n//2))

        exit(0)

    evens = {}

    odds = {}

    for i, v in enumerate(a):

        if i % 2 == 0:

            if v in evens:

                evens[v] += 1

            else:

                evens[v] = 1

        else:

            if v in odds:

                odds[v] += 1

            else:

                odds[v] = 1

    if len(evens) == 1 and len(odds) == 1:

        print((0))

        exit(0)



    e = sorted(list(evens.items()), key=lambda x: x[1], reverse=True)

    o = sorted(list(odds.items()), key=lambda x: x[1], reverse=True)

    if e[0][0] != o[0][0]:

        even_ans = (n // 2) - e[0][1]

        odd_ans = (n // 2) if len(o) == 1 else (n // 2) - o[0][1]

        a1 = even_ans+odd_ans



        even_ans = (n // 2) if len(e) == 1 else (n // 2) - e[0][1]

        odd_ans = (n // 2) - o[0][1]

        a2 = even_ans+odd_ans

        print((min(a1, a2)))

    else:

        even_ans = (n // 2) - e[0][1]

        odd_ans = (n // 2) if len(o) == 1 else (n // 2) - o[1][1]

        a1 = even_ans + odd_ans



        even_ans = (n // 2) if len(e) == 1 else (n // 2) - e[1][1]

        odd_ans = (n // 2) - o[0][1]

        a2 = even_ans + odd_ans

        print((min(a1, a2)))



# 6

# 3 1 3 2 4 2



def input_list():

    return list(map(int, input().split()))



def lcm_base(x, y):

    return (x * y) // fractions.gcd(x, y)



def lcm_list(numbers):

    return reduce(lcm_base, numbers, 1)



def gcd(*numbers):

    return reduce(fractions.gcd, numbers)



def gcd_list(numbers):

    return reduce(fractions.gcd, numbers)



if __name__ == "__main__":

    main()

def main():
    n = int(eval(input()))
    v = input_list()
    evens = []
    odds = []
    vs = v[:]
    kind = len(set(vs))
    if kind == 1:
        print((n // 2))
        exit(0)
    for i, vv in enumerate(v):
        if i % 2 == 0:
            evens.append(vv)
        else:
            odds.append(vv)
    ec = collections.Counter(evens)
    oc = collections.Counter(odds)
    m = n // 2
    ans = 0
    em = ec.most_common()
    om = oc.most_common()
    if em[0][0] == om[0][0]:
        p1 = m - em[0][1] + m - om[1][1]
        p2 = m - em[1][1] + m - om[0][1]
        print((min(p1, p2)))
    else:
        print((m - em[0][1] + m - om[0][1]))


def input_list():
    return list(map(int, input().split()))


def input_list_str():
    return list(map(str, input().split()))


def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def gcd(*numbers):
    return reduce(fractions.gcd, numbers)


def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


# 2で割り切れる回数
def divide_two(arg):
    c = 0
    while True:
        if c >= 2:
            break
        if arg % 2 != 0:
            break
        arg //= 2
        c += 1
    return c


import math
import fractions
import collections
from functools import reduce

main()

import math
import fractions
from functools import reduce


def main():
    n = int(eval(input()))
    a = input_list()
    if len(set(a)) == 1:
        print((n // 2))
        exit(0)
    evens = {}
    odds = {}
    for i, v in enumerate(a):
        if i % 2 == 0:
            if v in evens:
                evens[v] += 1
            else:
                evens[v] = 1
        else:
            if v in odds:
                odds[v] += 1
            else:
                odds[v] = 1
    if len(evens) == 1 and len(odds) == 1:
        print((0))
        exit(0)
    e = sorted(list(evens.items()), key=lambda x: x[1], reverse=True)
    o = sorted(list(odds.items()), key=lambda x: x[1], reverse=True)
    if e[0][0] != o[0][0]:
        even_ans = (n // 2) - e[0][1]
        odd_ans = (n // 2) if len(o) == 1 else (n // 2) - o[0][1]
        a1 = even_ans + odd_ans
        even_ans = (n // 2) if len(e) == 1 else (n // 2) - e[0][1]
        odd_ans = (n // 2) - o[0][1]
        a2 = even_ans + odd_ans
        print((min(a1, a2)))
    else:
        even_ans = (n // 2) - e[0][1]
        odd_ans = (n // 2) if len(o) == 1 else (n // 2) - o[1][1]
        a1 = even_ans + odd_ans
        even_ans = (n // 2) if len(e) == 1 else (n // 2) - e[1][1]
        odd_ans = (n // 2) - o[0][1]
        a2 = even_ans + odd_ans
        print((min(a1, a2)))


# 6
# 3 1 3 2 4 2
def input_list():
    return list(map(int, input().split()))


def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def gcd(*numbers):
    return reduce(fractions.gcd, numbers)


def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


if __name__ == "__main__":
    main()

+import math +import fractions +from functools import reduce + + -    v = input_list() -    evens = [] -    odds = [] -    vs = v[:] -    kind = len(set(vs)) -    if kind == 1: +    a = input_list() +    if len(set(a)) == 1: -    for i, vv in enumerate(v): +    evens = {} +    odds = {} +    for i, v in enumerate(a): -            evens.append(vv) +            if v in evens: +                evens[v] += 1 +            else: +                evens[v] = 1 -            odds.append(vv) -    ec = collections.Counter(evens) -    oc = collections.Counter(odds) -    m = n // 2 -    ans = 0 -    em = ec.most_common() -    om = oc.most_common() -    if em[0][0] == om[0][0]: -        p1 = m - em[0][1] + m - om[1][1] -        p2 = m - em[1][1] + m - om[0][1] -        print((min(p1, p2))) +            if v in odds: +                odds[v] += 1 +            else: +                odds[v] = 1 +    if len(evens) == 1 and len(odds) == 1: +        print((0)) +        exit(0) +    e = sorted(list(evens.items()), key=lambda x: x[1], reverse=True) +    o = sorted(list(odds.items()), key=lambda x: x[1], reverse=True) +    if e[0][0] != o[0][0]: +        even_ans = (n // 2) - e[0][1] +        odd_ans = (n // 2) if len(o) == 1 else (n // 2) - o[0][1] +        a1 = even_ans + odd_ans +        even_ans = (n // 2) if len(e) == 1 else (n // 2) - e[0][1] +        odd_ans = (n // 2) - o[0][1] +        a2 = even_ans + odd_ans +        print((min(a1, a2))) -        print((m - em[0][1] + m - om[0][1])) +        even_ans = (n // 2) - e[0][1] +        odd_ans = (n // 2) if len(o) == 1 else (n // 2) - o[1][1] +        a1 = even_ans + odd_ans +        even_ans = (n // 2) if len(e) == 1 else (n // 2) - e[1][1] +        odd_ans = (n // 2) - o[0][1] +        a2 = even_ans + odd_ans +        print((min(a1, a2))) +# 6 +# 3 1 3 2 4 2 - - -def input_list_str(): -    return list(map(str, input().split())) -# 2で割り切れる回数 -def divide_two(arg): -    c = 0 -    while True: -        if c >= 2: -            break -        if arg % 2 != 0: -            break -        arg //= 2 -        c += 1 -    return c - - -import math -import fractions -import collections -from functools import reduce - -main() +if __name__ == "__main__": +    main()