import std.stdio;
import std.conv;
import std.array;
import std.algorithm;

void main()
{
    int n = readln.split[0].to!int;
    int[] v = readln.split.to!(int[]);

    int[][] counter = new int[][](2, 100000);

    foreach (i; 0..n) counter[i % 2][v[i] - 1]++;

    ulong[][] max_i = new ulong[][](2, 2);
    foreach (i; 0..counter.length){
        if (counter[i][0] > counter[i][1]){
            max_i[i][1] = 1;
        } else {
            max_i[i][0] = 1;
        }
        foreach (j; 2..counter[i].length){
            if (counter[i][j] > counter[i][max_i[i][1]]){
                max_i[i][1] = j;

                if (counter[i][j] > counter[i][max_i[i][0]]){
                    max_i[i][1] = max_i[i][0];
                    max_i[i][0] = j;
                }
            }
        }
    }

    int ans;
    if (max_i[0][0] != max_i[1][0]){
        ans = n - counter[0][max_i[0][0]] - counter[1][max_i[1][0]];
    } else {
        ans = n - max(counter[0][max_i[0][0]] + counter[1][max_i[1][1]], counter[0][max_i[0][1]] + counter[1][max_i[1][0]]);
    }

    writeln(ans);
}

