#include <bits/stdc++.h>
using namespace std;
int main() {
  map<int, int> mp;
  int n, x;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &x), mp[x]++;
  int ans = 0;
  for (map<int, int>::iterator it = mp.begin(); it != mp.end(); ++it) {
    while (it->second > 3) {
      ans++;
      it->second -= 4;
    }
  }
  for (map<int, int>::iterator it = mp.begin(); it != mp.end(); ++it) {
    if (it->second < 2) continue;
    for (map<int, int>::iterator jt = mp.begin(); jt != mp.end(); ++jt) {
      if (it == jt) continue;
      if (jt->second < 2) continue;
      while (it->second > 1 && jt->second > 1) {
        ans++;
        it->second -= 2;
        jt->second -= 2;
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
