#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  vector<int> v;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(), v.end());
  vector<int> g;
  int count = 1;
  a = v[0];
  for (int i = 1; i < n; i++) {
    if (a == v[i])
      count++;
    else {
      g.push_back(count);
      count = 1;
      a = v[i];
    }
  }
  g.push_back(count);
  int res = 0;
  for (int i = 0; i < g.size() - 1; i++) {
    if (g[i] < 2 && g[i + 1] < 2)
      continue;
    else if (g[i] > 1 && g[i + 1] > 1) {
      res += min(g[i] / 2, g[i + 1] / 2);
      g[i + 1] = max(g[i], g[i + 1]) - 2 * min(g[i] / 2, g[i + 1] / 2);
    } else
      g[i + 1] = max(g[i + 1], g[i]);
  }
  res += g[g.size() - 1] / 4;
  cout << res << endl;
}
