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

void main(){
    auto n = readln().strip().to!int();
    auto v = readln().strip().split().map!(to!int)().array();

    int[int] sp1, sp2;

    foreach(i, e; v) {
        if(i % 2 == 0) {
            sp1[e] ++;
        } else {
            sp2[e] ++;
        }
    }

    auto s1 = sort!("a[1] > b[1]")(zip(sp1.keys, sp1.values)).array;
    auto s2 = sort!("a[1] > b[1]")(zip(sp2.keys, sp2.values)).array;

    int k1 = s1[0][0];
    int k2 = s2[0][0];

    if(k1 == k2) {
        s1 ~= tuple(0, 0);
        s2 ~= tuple(0, 0);
        auto s10_21 = s1[0][1] + s2[1][1];
        auto s11_20 = s1[1][1] + s2[0][1];
        if(s10_21 > s11_20) {
            k1 = s1[0][0];
            k2 = s2[1][0];
        } else {
            k1 = s1[1][0];
            k2 = s2[0][0];
        }
    }

    writeln((n+1)/2 - sp1.get(k1, 0) + n/2 - sp2.get(k2, 0));
}