#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  map<int, int> m;
  while (n--) {
    int x;
    cin >> x;
    m[x]++;
  }
  int ans = 0;
  bool prev = 0;
  for (auto x = m.begin(); x != m.end();) {
    if (x->second >= 4) ans += (x->second / 4), x->second %= 4;
    if (x->second > 1) {
      if (prev)
        ans++, prev = 0;
      else
        prev = 1;
    }
    x++;
  }
  cout << ans;
  return 0;
}
