import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array, std.typecons, std.container;
import std.math, std.numeric, core.bitop;

enum long mod = 10^^9 + 7;

void main() {
    int n;
    int[] a;

    scan(n);
    a = readln.split.to!(int[]);

    int[int] b1, b2;
    int mc;
    int ans;

    foreach (i ; 0 .. n) {
        if (i % 2 == 0) {
            b1[a[i]]++;
        }
        else {
            b2[a[i]]++;
        }
    }

    auto c1 = b1.byPair.array.sort!"a[1] > b[1]";
    auto c2 = b2.byPair.array.sort!"a[1] > b[1]";

    if (c1.front[0] != c2.front[0]) {
        ans = n - c1.front[1] - c2.front[1];
    }
    else {
        ans = n;

        if (c1.length > 1) {
            ans = min(ans, n - c1[1][1] - c2[0][1]);
        }
        else {
            ans = min(ans, n - c2[0][1]);
        }

        if (c2.length > 1) {
            ans = min(ans, n - c1[0][1] - c2[1][1]);
        }
        else {
            ans = min(ans, n - c1[0][1]);
        }
    }

    writeln(ans);

    debug {
        writeln(c1);
        writeln(c2);
    }
}

























void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}
