function twoMax(arr) {
    var first = 0;
    var firstKey = -1
    var second = 0;
    var secondKey = -1;
    for (var i = 0; i < arr.length; i++) {
        if (arr[i] >= first) {
            second = first;
            secondKey = firstKey;
            first = arr[i];
            firstKey = i;
        } else if (arr[i] >= second) {
            second = arr[i];
            secondKey = i;
        }
    }
    return [first, firstKey, second, secondKey];
}
function Main(input) {
    input = input.split("\n");
    var n = parseInt(input[0], 10);
    var V = input[1].split(" ").map(x => parseInt(x, 10));
    var freqEven = new Array(100001).fill(0);
    var freqOdd = new Array(100001).fill(0);
    for (var i = 0; i < n; i++) {
        if (i % 2 == 0) {
            freqEven[V[i]]++;
        } else {
            freqOdd[V[i]]++;
        }
    }
    var evenTwoMax = twoMax(freqEven);
    var evenFirst = evenTwoMax[0];
    var evenFirstKey = evenTwoMax[1]; 
    var evenSecond = evenTwoMax[2];
    var oddTwoMax = twoMax(freqOdd);
    var oddFirst = oddTwoMax[0];
    var oddFirstKey = oddTwoMax[1];
    var oddSecond = oddTwoMax[2];
    var minus = 0;
    if (evenFirstKey == oddFirstKey) {
        minus = Math.max(evenFirst+oddSecond, oddFirst + evenSecond);
    } else {
        minus = evenFirst + oddFirst;
    }
    console.log(n-minus);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));