#include <iostream> // cout, endl, cin
#include <iomanip>
#include <string>        // string, to_string, stoi
#include <vector>        // vector
#include <algorithm>     // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility>       // pair, make_pair
#include <tuple>         // tuple, make_tuple
#include <cstdint>       // int64_t, int*_t
#include <cstdio>        // printf
#include <map>           // map
#include <queue>         // queue, priority_queue
#include <set>           // set
#include <stack>         // stack
#include <deque>         // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset>        // bitset
#include <cctype>        // isupper, islower, isdigit, toupper, tolower
#include <math.h>
#include <numeric>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
const int INF = 1001001001;
const int BG = 1000000007;

pair<pair<int, int>, pair<int, int>> get_fs(vector<int> A)
{
    map<int, int> mp;
    rep(i, A.size())
    {
        if (mp.count(A[i]))
        {
            mp[A[i]]++;
        }
        else
        {
            mp[A[i]] = 1;
        }
    }
    int first_key = 0, first_value = 0, second_key = 0, second_value = 0;
    for (auto m : mp)
    {
        if (m.second >= first_value)
        {
            int tmp_value = first_value;
            first_value = m.second;
            second_value = tmp_value;
            int tmp_key = first_key;
            first_key = m.first;
            second_key = tmp_key;
            continue;
        }
        if (m.second >= second_value)
        {
            second_value = m.second;
            second_key = m.first;
            continue;
        }
    }
    return make_pair(make_pair(first_key, first_value), make_pair(second_key, second_value));
}

int main()
{
    int n;
    cin >> n;
    vector<int> E(n / 2), O(n / 2);

    rep(i, n)
    {
        int tmp;
        cin >> tmp;
        if (i % 2 == 0)
        {
            E[i / 2] = tmp;
        }
        else
        {
            O[i / 2] = tmp;
        }
    }
    auto ep = get_fs(E);
    auto op = get_fs(O);
    //debug
    // cout << ep.first.first << ':' << ep.first.second << ':' << ep.second.first << ':' << ep.second.second << endl;
    // cout << op.first.first << ':' << op.first.second << ':' << op.second.first << ':' << op.second.second << endl;

    int e_key, o_key;

    //1番多い要素の数字が同じ場合
    if (ep.first.first == op.first.first)
    {
        if (ep.first.second > op.first.second)
        {
            e_key = ep.first.first;
            o_key = op.second.first;
        }
        else if (ep.first.second < op.first.second)
        {
            e_key = ep.second.first;
            o_key = op.first.first;
        }
        else
        {
            if (ep.second.second >= op.second.second)
            {
                e_key = ep.second.first;
                o_key = op.first.first;
            }
            else
            {
                e_key = ep.first.first;
                o_key = op.second.first;
            }
        }
    }
    else
    {
        e_key = ep.first.first;
        o_key = op.first.first;
    }

    //debug
    // cout << e_key << ':' << o_key << endl;
    int ans = 0;
    rep(i, E.size())
    {
        if (E[i] != e_key)
        {
            ans++;
        }
    }
    rep(i, O.size())
    {
        if (O[i] != o_key)
        {
            ans++;
        }
    }

    cout << ans << endl;
}


Measured memory_bytes: 3200