var lines = [];
var readline = require('readline');

var rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
});

rl.on('line', function (x) {
    lines.push(x);
});

rl.on('close', function () {
    var N = lines.shift(); N = Number(N);
    var v = Array(N);
    var counter_g = Array(N).fill(0); var max_g = -1;
    var counter_k = Array(N).fill(0); var max_k = -1;
    var result = 0;

    var tmp = lines[0].split(" ");
    for (var i = 0; i < N; i++) {
        v[i] = Number(tmp[i]);
        i % 2 === 0 ? counter_g[i]++ : counter_k[i]++;
    }

    var g = -1; var k = -1;
    for (var i = 0; i < N; i++) { if (counter_g[i] > max_g) { max_g = counter_g[i]; g = i; } }
    for (var i = 0; i < N; i++) { if (counter_k[i] > max_k && v[i] !== v[g]) { max_k = counter_k[i]; k = i; } }

    if (k === -1) { v[k] = -1; }

    for (var i = 0; i < N; i++) {
        if (i % 2 === 0 && v[i] !== v[g]) { result++; }
        if (i % 2 !== 0 && v[i] !== v[k]) { result++; }
    }
    console.log(result);
});