using static System.Console;
using System.Linq;
using System.Collections.Generic;

namespace ConsoleApp4
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(ReadLine());
            var vs = ReadLine().Split(' ');


            var odd = new List<string>();
            var even = new List<string>();

            for (var i = 0; i < n; i++)
            {

                if (i % 2 == 0)
                {
                    even.Add(vs[i]);
                }
                else
                {
                    odd.Add(vs[i]);
                }
            }


            var e2 = even
                .GroupBy(x => x);

            var o2 = odd
                .GroupBy(x => x);

            if (e2.Count() == 1 && o2.Count() == 1)
            {
                if (e2.First().Key == o2.First().Key)
                {
                    WriteLine(n / 2);
                }
                else
                {
                    WriteLine(0);
                }
            }
            else
            {
                if (e2.Count() == 1)
                {
                    var o3 = o2
                        .Select(x => new { Value = x, Count = x.Count() })
                        .OrderByDescending(x => x.Count);

                    if (e2.First().Key != o3.First().Value.Key)
                    {
                        WriteLine(n / 2 - o3.First().Count);
                    }
                    else
                    {
                        WriteLine(n / 2 - o3.Skip(1).First().Count);
                    }
                }
                else if (o2.Count() == 1)
                {
                    var e3 = e2
                        .Select(x => new { Value = x, Count = x.Count() })
                        .OrderByDescending(x => x.Count);

                    if (o2.First().Key != e3.First().Value.Key)
                    {
                        WriteLine(n / 2 - e3.First().Count);
                    }
                    else
                    {
                        WriteLine(n / 2 - e3.Skip(1).First().Count);
                    }

                }
                else
                {
                    var o3 = o2
                        .Select(x => new { Value = x, Count = x.Count() })
                        .OrderByDescending(x => x.Count);

                    var e3 = e2
    .Select(x => new { Value = x, Count = x.Count() })
    .OrderByDescending(x => x.Count);


                    if (o3.First().Value.Key != e3.First().Value.Key)
                    {
                        WriteLine((n / 2 - o3.First().Count) + (n / 2 - e3.First().Count));
                    }
                    else
                    {
                        if (o3.First().Count == e3.First().Count)
                        {
                            WriteLine((n / 2 - System.Math.Max(o3.Skip(1).First().Count, e3.Skip(1).First().Count)) + (n / 2 - o3.First().Count));
                        }
                        else if (o3.First().Count < e3.First().Count)
                        {
                            WriteLine((n / 2 - e3.First().Count) + (n / 2 - o3.Skip(1).First().Count));
                        }
                        else
                        {
                            WriteLine((n / 2 - o3.First().Count) + (n / 2 - e3.Skip(1).First().Count));
                        }
                    }

                }
            }



        }
    }
}

Measured memory_bytes: 56720