#include <bits/stdc++.h>
using namespace std;
int size_n;
int result = 0;
int used[105];
vector<int> lens(0);
int main() {
  int ii, jj;
  int tmp;
  cin >> size_n;
  for (ii = 0; ii < size_n; ii++) {
    cin >> tmp;
    used[tmp]++;
  }
  for (jj = 0; jj < 5; jj++) {
    for (ii = 1; ii < 101; ii++) {
      if (used[ii] > 1) lens.push_back(ii);
    }
    for (ii = (lens.size() - 1); ii > 0; ii--) {
      tmp = min(used[lens[ii]], used[lens[ii - 1]]) / 2;
      result += tmp;
      used[lens[ii]] -= tmp * 2;
      used[lens[ii - 1]] -= tmp * 2;
      if (used[lens[ii]] > used[lens[ii - 1]])
        swap(used[lens[ii] - 1], used[lens[ii]]);
    }
    lens.clear();
  }
  for (ii = 101; ii > 0; ii--) result += used[ii] / 4;
  cout << result << endl;
  return 0;
}
