using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using static System.Console;
using static PB10004.Algorithm.Util;

namespace PB10004.Algorithm
{
    class Template
    {
        static void Main(string[] args)
        {
            new C().Solve();
        }
    }
    class C{
        Dictionary<int, int> odd, even;
        public void Solve(){
            var n = ReadInt();
            var array = ReadIntArray();
            odd = new Dictionary<int,int>(); 
            even = new Dictionary<int,int>(); 
            for(int i=0;i<n/2;i++){
                var e = array[2*i];
                var o = array[2*i+1];
                if(even.ContainsKey(e))
                    even[e] = even[e]+1;
                else
                    even.Add(array[2*i], 1);
                if(odd.ContainsKey(o))
                    odd[o] = odd[o] + 1;
                else
                    odd.Add(array[2*i+1], 1);
            }
            var odd2 = odd.OrderByDescending(x=>x.Value).ToArray();
            var even2 = even.OrderByDescending(x=>x.Value).ToArray();
            if(odd2[0].Key == even2[0].Key){
                if(odd2.Count() == 1 && even2.Count() == 1){
                    WriteLine(n/2); //両方1種類
                }
                else if(odd2.Count() > 1 && even2.Count() > 1){
                    if(odd2[1].Value >= even2[1].Value)
                        WriteLine(n - even2[0].Value - odd2[1].Value);
                    else
                        WriteLine(n - odd2[0].Value - even2[1].Value);
                }
                else if(odd2.Count() > 1){
                    WriteLine(n - even2[0].Value - odd2[1].Value);
                }
                else{
                    WriteLine(n - odd2[0].Value - even2[1].Value);
                }
            }
            else
                WriteLine(n - even.Values.Max() - odd.Values.Max());
        }
    }
    class D{
        public void Solve(){}
    }
    public static class Util
    {
        /// <summary>
        /// 標準入力をint型にパースする
        /// </summary>
        /// <returns></returns>
        public static int ReadInt(){
            return int.Parse(ReadLine());
        }
        /// <summary>
        /// 標準入力をint型の配列にする
        /// </summary>
        /// <returns></returns>
        public static int[] ReadIntArray(){
            return ReadLine().Split(' ').Select(x=>int.Parse(x)).ToArray();
        }
        /// <summary>
        /// 標準入力をlong型にパースする
        /// </summary>
        /// <returns></returns>
        public static long ReadLong()
        {
            return long.Parse(ReadLine());
        }
        /// <summary>
        /// 標準入力をlong型の配列にする
        /// </summary>
        /// <returns></returns>
        public static long[] ReadLongArray()
        {
            return ReadLine().Split(' ').Select(long.Parse).ToArray();
        }
        /// <summary>
        /// 一定値の数列を生成する
        /// </summary>
        /// <param name="value"></param>
        /// <param name="length"></param>
        /// <returns></returns>
        public static IEnumerable<long> ConstSeq(long value, long length)
        {
            for (int i = 0; i < length; i++)
            {
                yield return value;
            }
        }
        /// <summary>
        /// int配列の累積和を求める
        /// </summary>
        /// <param name="array"></param>
        /// <returns></returns>
        public static IEnumerable<int> CumulativeSum(IEnumerable<int> array)
        {
            int tmp = 0;
            foreach (var num in array)
                yield return tmp += num;
        }
        /// <summary>
        /// long配列の累積和を求める
        /// </summary>
        /// <param name="array"></param>
        /// <returns></returns>
        public static IEnumerable<long> CumulativeSum(IEnumerable<long> array)
        {
            long tmp = 0;
            foreach (var num in array)
                yield return tmp += num;
        }
        /// <summary>
        /// 最大公約数をユークリッドの互除法で求める
        /// </summary>
        /// <param name="a"></param>
        /// <param name="b"></param>
        /// <returns></returns>
        public static long Gcd(long a, long b)
        {
            return b == 0 ? a : Gcd(b, a % b);
        }
        /// <summary>
        /// 最小公倍数を求める
        /// </summary>
        /// <param name="a"></param>
        /// <param name="b"></param>
        /// <returns></returns>
        public static long Lcm(long a, long b)
        {
            return a * b / Gcd(a, b);
        }
    }
}

Measured memory_bytes: 29280