#include <iostream>
using namespace std;

int main() {
  int N;
  cin >> N;

  int tmp, V[2][100005] = {0}, m[2], n1[2];
  for (int i = 0; i < N; i++) {
    cin >> tmp;
    V[i & 1][tmp]++;
    if (m[i & 1] < V[i & 1][tmp]) {
      m[i & 1]  = V[i & 1][tmp];
      n1[i & 1] = tmp;
    }
  }

  sort(V[0], V[0] + 100005, greater<int>());
  sort(V[1], V[1] + 100005, greater<int>());
  int ans = 0;
  if (n1[0] != n1[1])
    ans = N - m[0] - m[1];
  else
    ans = min(N - m[0] - V[1][1], N - m[1] - V[0][1]);
  cout << ans << endl;

  return 0;
}
