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

namespace CSharpSample01
{

    

    class Program
    {

        
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] data = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();

            var evendic = new Dictionary<int, int>();
            var unevendic = new Dictionary<int, int>();
            evendic[-1] = 0;
            unevendic[-1] = 0;

            for(int i = 0; i < n; i++)
            {
                int t = data[i];
                if(i % 2 == 0)
                {
                    if (!evendic.ContainsKey(t))
                    {
                        evendic[t] = 1;
                    }
                    else
                    {
                        evendic[t]++;
                    }
                }
                else
                {
                    if (!unevendic.ContainsKey(t))
                    {
                        unevendic[t] = 1;
                    }
                    else
                    {
                        unevendic[t]++;
                    }
                }
            }

            int ans = 0;         
            
            int cnt = 0;

            var evensort = evendic.OrderByDescending(x => x.Value).ToDictionary(x => x.Key, x => x.Value);
            var unevensort = unevendic.OrderByDescending(x => x.Value).ToDictionary(x => x.Key, x => x.Value);

            int ek1 = 0, ek2 = 0;
            int ev1 = 0, ev2 = 0;
            foreach(var s in evensort)
            {
                cnt++;
                if(cnt == 1)
                {
                    ek1 = s.Key;
                    ev1 = s.Value;
                }
                if(cnt == 2)
                {
                    ek2 = s.Key;
                    ev2 = s.Value;
                    break;
                }
            }

            cnt = 0;

            int uk1 = 0, uk2 = 0;
            int uv1 = 0, uv2 = 0;
            foreach(var s in unevensort)
            {
                cnt++;
                if(cnt == 1)
                {
                    uk1 = s.Key;
                    uv1 = s.Value;
                }
                if(cnt == 2)
                {
                    uk2 = s.Key;
                    uv2 = s.Value;
                    break;
                }
            }
            
            if(ek1 != uk1)
            {
                ans = n - ev1 - uv1;
            }
            else
            {
                if(ev1 > uv1)
                {
                    ans = n - ev1 - uv2;
                }
                else
                {
                    if(ev1 == uv1)
                    {
                        if(ev2 > uv2)
                        {
                            ans = n - ev2 - uv1;
                        }
                        else
                        {
                            ans = n - ev1 - uv2;
                        }
                    }
                    else
                    {
                        ans = n - ev2 - uv1;
                    }
                }
            }
            
            Console.WriteLine(ans);

        }
    }
}


Measured memory_bytes: 29024