using System;
using System.Collections.Generic;
using System.Linq;
using static System.Math;
using static AtCoderTemplate.MyExtensions;
using static AtCoderTemplate.MyInputOutputs;
using static AtCoderTemplate.MyNumericFunctions;

namespace AtCoderTemplate {
    class Program {
        static void Main (string[] args) {
            var n = ReadInt ();
            var v = ReadInts ();
            var odd = Enumerable.Range (0, n).Where (i => (i + 1) % 2 == 1).Select (i => v[i]).ToList ();
            var oddGroups = odd.GroupBy (x => x).OrderByDescending (x => x.Count ());
            var even = Enumerable.Range (0, n).Where (i => (i + 1) % 2 == 0).Select (i => v[i]).ToList ();
            var evenGroups = even.GroupBy (x => x).OrderByDescending (x => x.Count ());

            var oddMaxNum = oddGroups.First ().First ();
            var evenMaxNum = evenGroups.First ().First ();
            var oddMaxCount = oddGroups.First ().Count ();
            var evenMaxCount = evenGroups.First ().Count ();
            var result = 0;
            if (oddMaxNum != evenMaxNum) {
                result = n - (oddMaxCount + evenMaxCount);
            } else {
                if (oddMaxCount == evenMaxCount) {
                    if (oddMaxCount == n / 2) {
                        result = n / 2;
                    } else {
                        var oddMaxCount2 = oddGroups.Skip (1).First ().Count ();
                        var evenMaxCount2 = evenGroups.Skip (1).First ().Count ();
                        if (oddMaxCount2 >= evenMaxCount2) {
                            result = n - (oddMaxCount2 + evenMaxCount);
                        } else {
                            result = n - (oddMaxCount + evenMaxCount2);
                        }
                    }
                } else {
                    var oddMaxCount2 = oddGroups.Skip (1).First ().Count ();
                    var evenMaxCount2 = evenGroups.Skip (1).First ().Count ();
                    if (oddMaxCount >= evenMaxCount) {
                        result = n - (oddMaxCount + evenMaxCount2);
                    } else {
                        result = n - (oddMaxCount2 + evenMaxCount);
                    }
                }
            }
            Console.WriteLine (result);
        }
    }

    static class MyInputOutputs {
        /* Input & Output*/
        public static int ReadInt () {
            return int.Parse (Console.ReadLine ());
        }
        public static List<int> ReadInts () {
            return Console.ReadLine ().Split (' ').Select (c => int.Parse (c)).ToList ();
        }
        public static List<List<int>> ReadColumns (int n) {
            /*
            入力例
            A1 B1
            A2 B2
            ...
            An Bn

            出力例
            [[A1,A2,...,An], [B1,B2,...,Bn]]
            */
            var seq = Enumerable.Range (0, n).Select (i => ReadInts ()).ToList ();
            return Enumerable.Range (0, seq.First ().Count ()).Select (i => seq.Select (items => items[i]).ToList ()).ToList ();
        }
        public static void PrintEnum<T> (IEnumerable<T> list) {
            Console.Write (list.First ());
            foreach (var item in list.Skip (1)) {
                Console.Write ($" {item}");
            }
            Console.Write ("\n");
        }
        public static void PrintLnEnum<T> (IEnumerable<T> list) {
            foreach (var item in list) {
                Console.WriteLine (item);
            }
        }
    }

    static class MyNumericFunctions {
        public static int Fact (int n) {
            return Enumerable.Range (1, n).Aggregate (1, ((i, k) => i * k));
        }
        public static int PermNum (int n, int m) {
            if (m > n) {
                return 0;
            }
            return Enumerable.Range (n - m, m + 1).Aggregate (1, ((i, k) => i * k));
        }
        public static int CombNum (int n, int m) {
            return PermNum (n, m) / Fact (m);
        }
        // 最大公約数 (m ≧ n)
        public static int GCD (int m, int n) {
            if (n == 0) {
                return m;
            } else {
                return GCD (n, m % n);
            }
        }
        // 最小公倍数 (m ≧ n)
        public static int LCM (int m, int n) {
            return GCD (m, n) / (m * n);
        }
    }

    static class MyExtensions {
        /// <summary>
        /// 一つ前の値との差を得る
        /// O(N * log(N))
        /// </summary>
        public static IEnumerable<int> Diff (this IEnumerable<int> source) {
            var list = source.ToList ();
            return Enumerable.Range (1, list.Count - 1)
                .Select (i => list[i] - list[i - 1]);
        }

        /// <summary>
        /// 累積和を得る
        /// O(N * log(N))
        /// </summary>
        public static IEnumerable<int> CumSum (this IEnumerable<int> source) {
            var list = source.ToList ();
            var result = new List<int> { list[0] };
            foreach (var i in Enumerable.Range (1, source.Count () - 1)) {
                result.Add (result[i - 1] + list[i]);
            }
            return result;
        }

        /// <summary>
        /// 昇順にソートしたインデックスを得る
        /// </summary>
        public static IEnumerable<int> SortIndex<T> (this IEnumerable<T> source) {
            return source
                .Select ((item, i) => new { Item = item, Index = i })
                .OrderBy (x => x.Item)
                .Select (x => x.Index);
        }
    }
}

Measured memory_bytes: 42712