#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int t;
  map<int, int> m;
  int res = 0;
  while (n--) {
    scanf("%d", &t);
    m[t]++;
    if (m[t] >= 4) m[t] -= 4, res++;
  }
  t = 0;
  for (map<int, int>::iterator it = m.begin(); it != m.end(); it++)
    t += it->second >= 2;
  res += t / 2;
  cout << res << endl;
  return 0;
}
