#include <bits/stdc++.h>
using namespace std;
using ll = long long;


int main(){
  int n;
  cin >> n;
  vector<int> v0(n/2), v1(n/2);
  for(int i = 0; i<n/2;i++){
    cin >> v0.at(i) >> v1.at(i);
  }

  vector<pair<int, int>> v0c(100001),  v1c(100001);

  for(int i = 0; i<n/2;i++){
    v0c[v0.at(i)].first += 1;
    v0c[v0.at(i)].second =v0.at(i);
    v1c[v1.at(i)].first += 1;
    v1c[v1.at(i)].second =v1.at(i);
  }
  sort(v0c.rbegin(), v0c.rend());
  sort(v1c.rbegin(), v1c.rend());

  if(v0c[0].second != v1c[0].second){
    cout << n - v0c[0].first - v1c[0].first << endl;
  }else{
    int ans = min(n-v0c[0].first - v1c[1].first, n-v0c[1].first - v1c[0].first);
    cout << ans << endl;
  }



}
