#include <bits/stdc++.h>
using namespace std;
long long powi(long long base, int p) {
  long long res = 1;
  while (p--) res *= base;
  return res;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
bool is_vowel(char c) {
  c = tolower(c);
  return c == 'a' || c == 'e' || c == 'o' || c == 'i' || c == 'u' || c == 'y';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  map<int, int> dict;
  for (int i = 0, a; i < n; i++) {
    cin >> a;
    dict[a]++;
  }
  bool hh = false;
  int res = 0;
  for (auto p : dict) {
    res += p.second / 4;
    int c = p.second % 4;
    if (c >= 2 && hh) {
      res++;
      hh = false;
    } else if (c >= 2)
      hh = true;
  }
  cout << res;
  return 0;
}
