///\/\/\/

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define int long long
#define rep(i,x,y) for(ll i=x;i<y;i++)
#define irep(i,a) for(auto i = a.begin(); i != a.end(); ++i)
#define nvarep(n,a) ll n;cin>>n;vector<ll>a(n);rep(i,0,n)cin>>a[i]
#define vecrep(n,a,type) vector<type>a(n);rep(i,0,n)cin>>a[i]
#define lcm(a,b) (a/__gcd(a, b)*b)
#define range(a) (a).begin(),(a).end() 
#define pb push_back
#define mp make_pair
#define nnn "\n"
#define spa " "
using p = pair<ll, ll>;
using garph = vector<vector<ll>>;
const int inf = 2147483647;//2*10^9
const ll INF = 9223372036854775807;//9*10^18

signed main (){
    nvarep(n,v);
    map<int,int>fm,bm;
    rep(i,0,n){
        if(i%2==0)fm[v[i]]++;
        else bm[v[i]]++;
    }
    vector<p>f,b;
    irep(i,fm){
        f.pb(mp(i->second,i->first));
    }
    irep(i,bm){
        b.pb(mp(i->second,i->first));
    }
    f.pb(mp(0,0));
    b.pb(mp(0,0));
    sort(range(f));
    reverse(range(f));
    sort(range(b));
    reverse(range(b));
    if(f[0].second==b[0].second){
        cout<<n-max(f[0].first+b[1].first,f[1].first+b[0].first)<<nnn;
    }else{
        cout<<n-f[0].first-b[0].first<<nnn;
    }
    return 0;
}
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main()
{
  int n;
  cin >> n;
  vector<int> even(1e5+1, 0);
  vector<int> odd(1e5+1, 0);
  rep(i,n) {
    int v;
    cin >> v;
    if (i%2) {
      odd[v]++;
    } else {
      even[v]++;
    }
  }
  pair<int, int> mx_odd = make_pair(0, 0);
  pair<int, int> mx_even = make_pair(0, 0);
  pair<int, int> mx_odd_2 = make_pair(0, 0);
  pair<int, int> mx_even_2 = make_pair(0, 0);

  rep(i, 1e5+1) {
    if (odd[i] > mx_odd.second) {
      mx_odd_2 = mx_odd;
      mx_odd = make_pair(i, odd[i]);
    } else {
      if (odd[i] > mx_odd_2.second) mx_odd_2 = make_pair(i, odd[i]);
    }
    if (even[i] > mx_even.second) {
      mx_even_2 = mx_even;
      mx_even = make_pair(i, even[i]);
    } else {
      if (even[i] > mx_even_2.second) mx_even_2 = make_pair(i, even[i]);
    }
  }
  int h = n/2;
  int odd_diff = (n/2 - mx_odd.second);
  int even_diff = (n/2 - mx_even.second);
  int ans = 0;
  if (mx_even.first == mx_odd.first) {
    int a = (h - mx_even.second) + (h - mx_odd_2.second);
    int b = (h - mx_odd.second) + (h - mx_even_2.second);
    ans = min(a, b);
  } else {
    ans = (h - mx_odd.second) + (h - mx_even.second);
  }
  cout << ans << endl;

  return 0;
}