output_description: Print the minimum number of elements that needs to be replaced.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      n
      v_1 v_2 ... v_n
attempt: import sys
  from functools import lru_cache, cmp_to_key
  from heapq import merge, heapify, heappop, heappush
  from math import *
  from collections import defaultdict as dd, deque, Counter as C
  from itertools import combinations as comb, permutations as perm
  from bisect import bisect_left as bl, bisect_right as br, bisect
  from time import perf_counter
  from fractions import Fraction
  
  # sys.setrecursionlimit(int(pow(10, 2)))
  # sys.stdin = open("input.txt", "r")
  # sys.stdout = open("output.txt", "w")
  mod = int(pow(10, 9) + 7)
  mod2 = 998244353
  
  
  def data():
      return sys.stdin.readline().strip()
  
  
  def out(*var, end="\n"):
      sys.stdout.write(" ".join(map(str, var)) + end)
  
  
  def l():
      return list(sp())
  
  
  def sl():
      return list(ssp())
  
  
  def sp():
      return map(int, data().split())
  
  
  def ssp():
      return map(str, data().split())
  
  
  def l1d(n, val=0):
      return [val for i in range(n)]
  
  
  def l2d(n, m, val=0):
      return [l1d(n, val) for j in range(m)]
  
  
  # @lru_cache(None)
  
  n = l()[0]
  A = l()
  e = []
  o = []
  for i in range(n):
      if i % 2:
          o.append(A[i])
      else:
          e.append(A[i])
  d = {}
  for i in range(n // 2):
      if o[i] not in d:
          d[o[i]] = 0
      d[o[i]] += 1
  mx = []
  for ks in d:
      mx.append([d[ks], ks])
  mx.sort(reverse=True)
  d = {}
  for i in range(n // 2):
      if e[i] not in d:
          d[e[i]] = 0
      d[e[i]] += 1
  mx1 = []
  for ks in d:
      mx1.append([d[ks], ks])
  mx1.sort(reverse=True)
  if mx[0][1] != mx1[0][1]:
      print(n - mx[0][0] - mx1[0][0])
  elif mx[0][0] > mx1[0][0]:
      if len(mx1) == 1:
          print(n - mx[0][0])
      else:
          print(n - mx[0][0] - mx1[1][0])
  else:
      mx, mx1 = mx1, mx
      if len(mx1) == 1:
          print(n - mx[0][0])
      else:
          print(n - mx[0][0] - mx1[1][0])
  
problem_description: Statement
  
  A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following
  conditions are satisfied:
  
    * For each i = 1,2,..., n-2, a_i = a_{i+2}.
    * Exactly two different numbers appear in the sequence.
  
  You are given a sequence v_1,v_2,...,v_n whose length is even. We would like
  to make this sequence /\/\/\/ by replacing some of its elements. Find the
  minimum number of elements that needs to be replaced.
samples: [{"input": "4\n    3 1 3 2", "output": "1\n    \n\nThe sequence 3,1,3,2 is not /\\/\\/\\/, but we can make it /\\/\\/\\/ by replacing\none of its elements: for example, replace the fourth element to make it\n3,1,3,1.\n\n* * *"}, {"input": "6\n    105 119 105 119 105 119", "output": "0\n    \n\nThe sequence 105,119,105,119,105,119 is /\\/\\/\\/.\n\n* * *"}, {"input": "4\n    1 1 1 1", "output": "2\n    \n\nThe elements of the sequence 1,1,1,1 are all the same, so it is not /\\/\\/\\/."}]