using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace AtCoder
{
    class Pair
    {
        public int num;
        public int count;
    }

    class Program
    {
        static void Main()
        {
            //ここから
            int n = ReadLineToInt();
            int[] v = ReadLineToIntArray();

            List<Pair> pairs1 = new List<Pair>();
            List<Pair> pairs2 = new List<Pair>();
            for(int i = 0; i < 100001; i++)
            {
                pairs1.Add(new Pair { num = i, count = 0 });
                pairs2.Add(new Pair { num = i, count = 0 });
            }

            for(int i = 0; i < n; i += 2)
            {
                pairs1[v[i]].count++;
            }

            for (int i = 1; i < n; i += 2)
            {
                pairs2[v[i]].count++;
            }

            var pair1_temp = pairs1.OrderByDescending(p => p.count).ToList();
            var pair2_temp = pairs2.OrderByDescending(p => p.count).ToList();

            int tar;

            if (pair1_temp[0].num == pair2_temp[0].num)
            {
                if (pair1_temp[0].count == pair2_temp[0].count)
                {
                    tar = pair1_temp[1].count > pair2_temp[1].count ? tar = pair1_temp[1].count + pair2_temp[0].count : pair1_temp[0].count + pair2_temp[1].count;
                }
                else
                {
                    tar = pair1_temp[0].count > pair2_temp[0].count ? pair1_temp[0].count + pair2_temp[1].count : pair1_temp[1].count + pair2_temp[0].count;
                }
            }
            else
            {
                tar = pair1_temp[0].count + pair2_temp[0].count;
            }

            int ans = n - tar;

            //ここまで
            Console.WriteLine(ans);
            Console.ReadKey();
        }

        long mod = 1000000007;
        static public void Swap<T>(ref T a,ref T b) { T temp = a;a = b;b = temp; }
        static public long GCD(int a, int b){ return b != 0 ? GCD(b, a % b) : a;}
        static public long LCM(int a, int b){ return (long)a * b / GCD(a, b); }
        static public int Factorial(int a) { return a == 1 ? a : a * Factorial(a - 1); }
        static public int Conbin(int n,int m) { return Factorial(n) / (Factorial(n - m) * Factorial(m)); }


        
        static public string ReadLineToString(){return Console.ReadLine();}
        static public int ReadLineToInt(){return int.Parse(Console.ReadLine());}
        static public long ReadLineToLong() { return long.Parse(Console.ReadLine()); }
        static public string[] ReadLineToStringArray(){return Console.ReadLine().Split(' ').ToArray();}
        static public int[] ReadLineToIntArray(){return Console.ReadLine().Split(' ').Select(int.Parse).ToArray();}
        static public long[] ReadLineToLongArray() { return Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); }
        static public List<string> ReadLineToStringList(){return Console.ReadLine().Split(' ').ToList();}
        static public List<int> ReadLineToIntList(){return Console.ReadLine().Split(' ').Select(int.Parse).ToList();}
        static public List<long> ReadLineToLongList() { return Console.ReadLine().Split(' ').Select(long.Parse).ToList(); }
    }
    
}


Measured memory_bytes: 37084