import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

int calc(int[] xs) {

    int[int] freq(int start) {
        int[int] d;
        for (int i = start; i < xs.length; i += 2) {
            d[xs[i]]++;
        }
        return d;
    }

    int m = cast(int) xs.length / 2;

    auto a = freq(0);
    auto b = freq(1);

    int[][] aa, bb;
    foreach (k, v; a) {
        aa ~= [m - v, k];
    }
    aa ~= [m, -1];
    foreach (k, v; b) {
        bb ~= [m - v, k];
    }
    bb ~= [m, -2];

    aa.sort();
    auto a2 = aa.take(2);

    bb.sort();
    auto b2 = bb.take(2);

    int ans = int.max;
    for (int i = 0; i < a2.length; i++) {
        for (int j = 0; j < b2.length; j++) {
            if (a2[i][1] != b2[j][1]) {
//                writeln("a ", a2[i][0], " ", a2[i][1]);
//                writeln("b ", b2[j][0], " ", b2[j][1]);
                ans = min(ans, a2[i][0] + b2[j][0]);
            }
        }
    }
    return ans;
}

void main() {
    readint;
    auto xs = readints;
    writeln(calc(xs));
}
