using System;
using System.Collections.Generic;
using System.Linq;
using static Atcoder;
using System.Threading.Tasks;
using System.ComponentModel;

public class Hello
{

    public static void Main()
    {
        int N = intRead();
        //int N = (int)Math.Pow(10, 5);
        int[] box = SpIntRead(' ');
        //int[] box = new int[(int)Math.Pow(10, 5)];
        //for (int i = 0; i < (int)Math.Pow(10, 5); i++) {
        //    box[i] = i;
        //}
        Dictionary<int, int> dic_1 = new Dictionary<int, int>();
        Dictionary<int, int> dic_2 = new Dictionary<int, int>();
        for (int i = 0; i < N; i += 2)
        {
            if (dic_1.ContainsKey(box[i])) dic_1[box[i]]++;
            else dic_1.Add(box[i], 1);
        }
        for (int i = 1; i < N; i += 2)
        {
            if (dic_2.ContainsKey(box[i])) dic_2[box[i]]++;
            else dic_2.Add(box[i], 1);
        }
        int max_1_key = 0; int max_1_value = 0;
        int max_2_key = 0; int max_2_value = 0;
        var dic_v1 = dic_1.OrderByDescending((x) => x.Value);
        var dic_v2 = dic_2.OrderByDescending((x) => x.Value);
        foreach (var val in dic_v1)
        {
            max_1_key = val.Key;
            max_1_value = val.Value;
            break;
        }
        foreach (var val in dic_v2)
        {
            max_2_key = val.Key;
            max_2_value = val.Value;
            break;
        }
        //初回計算おわり
        if (max_1_key != max_2_key)
        {
            int ans = 0;
            foreach (int key in dic_1.Keys)
            {
                if (max_1_key != key) ans += dic_1[key];
            }
            foreach (int key in dic_2.Keys)
            {
                if (max_2_key != key) ans += dic_2[key];
            }
            Console.WriteLine(ans);
            return;
        }

        int next_1_key = 0; int next_1_value = 0;
        int next_2_key = 0; int next_2_value = 0;
        int c = 0;
        foreach (var val in dic_v1)
        {
            if (c == 2) break;
            next_1_key = val.Key;
            next_1_value = val.Value;
            c++;
        }
        c = 0;
        foreach (var val in dic_v2)
        {
            if (c == 2) break;
            next_2_key = val.Key;
            next_2_value = val.Value;
            c++;
        }

        if (dic_1.Keys.Count() == 1 && dic_2.Keys.Count() == 1)
        {
            Console.WriteLine(N / 2);
            return;
        }
        else if (dic_1.Keys.Count() == 1)
        {
            int ans = 0;
            foreach (int key in dic_2.Keys)
            {
                if (next_2_key != key) ans += dic_2[key];
            }
            Console.WriteLine(ans);
            return;
        }
        else if (dic_2.Keys.Count() == 1)
        {
            int ans = 0;
            foreach (int key in dic_1.Keys)
            {
                if (next_1_key != key) ans += dic_1[key];
            }
            Console.WriteLine(ans);
            return;
        }


        if (next_1_value < next_2_value)
        {
            //n2有線
            int ans = 0;
            foreach (int key in dic_1.Keys)
            {
                if (max_1_key != key) ans += dic_1[key];
            }
            foreach (int key in dic_2.Keys)
            {
                if (next_2_key != key) ans += dic_2[key];
            }
            Console.WriteLine(ans);
            return;
        }
        else if (next_2_value < next_1_value)
        {
            int ans = 0;
            foreach (int key in dic_1.Keys)
            {
                if (next_1_key != key) ans += dic_1[key];
            }
            foreach (int key in dic_2.Keys)
            {
                if (max_2_key != key) ans += dic_2[key];
            }
            Console.WriteLine(ans);
            return;
        }
        else
        {
            int ans = 0;
            foreach (int key in dic_1.Keys)
            {
                if (next_1_key != key) ans += dic_1[key];
            }
            foreach (int key in dic_2.Keys)
            {
                if (max_2_key != key) ans += dic_2[key];
            }
            Console.WriteLine(ans);
            return;
        }
    }

}


public class Atcoder
{
    static void Swap<T>(ref T a, ref T b)
    {
        var t = a;
        a = b;
        b = t;
    }
    public static long LCM(long a, long b)
    {
        long c = a * b;
        if (a < b) Swap(ref a, ref b);
        long d = a % b;
        while (d != 0)
        {
            a = b;
            b = d;
            d = a % b;
        }
        return c / b;
    }
    public static string strReverce(string s)
    {
        return new string(s.Reverse().ToArray());
    }
    public static int intRead()
    {
        return int.Parse(Console.ReadLine());
    }
    public static bool IsPrime(int n)
    {
        if (n < 2) return false;
        if (n == 2) return true;
        if (n % 2 == 0) return false;

        //double sqrtNum = Math.Sqrt(n);
        for (int i = 3; i < n; i += 2)
        {
            if (n % i == 0) return false;
        }
        return true;
    }
    public static string[] SpRead(char c)
    {
        return Console.ReadLine().Split(c);
    }
    public static int[] SpIntRead(char c)
    {
        return Console.ReadLine().Split(' ').Select(a => int.Parse(a)).ToArray();
    }
    public static string ToConvertBit(int N, int e)
    {
        string ret = "";
        int r = 0;
        while (N != 0)
        {
            r = N % e;
            ret += r.ToString();
            N -= r;
            N /= e;
        }
        ret = strReverce(ret);
        return ret;
    }

}


Measured memory_bytes: 26464