import std.stdio, std.conv, std.string, std.algorithm.iteration, std.math, std.range, std.algorithm.sorting, std.algorithm.searching, std.algorithm.mutation, std.array, std.typecons;

void main()
{
    readln;
    auto t = readln;
    int[] list = t.split.to!(int[]);
    int[] eList;
    int[] oList;
    eList.length = 100001;
    oList.length = 100001;
    foreach(i, n; list.enumerate())
    {
        if(i % 2 == 0)
        {
            eList[n]++;
        }else{
            oList[n]++;
        }
    }

    auto eTop = searchTop2Index(eList);
    auto oTop = searchTop2Index(oList);
    int eSameNum = eTop[0];
    int oSameNum = oTop[0];
    if(eSameNum == oSameNum)
    {
        if(eList[eTop[1]] < oList[oTop[1]])
        {
            oSameNum = oTop[1];
        }else{
            eSameNum = eTop[1];
        }
    }

    writeln(list.length - eList[eSameNum] - oList[oSameNum]);
}

auto searchTop2Index(int[] list)
{
    int top1;
    int top1Count;
    int top2;
    int top2Count;
    foreach(i, n; list.enumerate())
    {
        if(top1Count < n)
        {
            top2 = top1;
            top2Count = top1Count;
            top1 = i.to!int;
            top1Count = n;
        }else if(top2Count < n)
        {
            top2 = i.to!int;
            top2Count = n;
        }
    }
    return Tuple!(int,int)(top1, top2);
}