#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1E9 + 7, INF = 2E18 + 5;
const double PI = 2 * acos(0.0);
const long double EPS = 1.0E-14;
map<long long, long long> mp;
int main() {
  long long n, val, ans = 0, ax = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> val;
    mp[val]++;
  }
  for (auto it = mp.begin(); it != mp.end(); it++) {
    val = it->second / 4;
    ans += val;
    mp[it->first] -= (val * 4);
    if (it->second >= 2) {
      ax++;
    }
  }
  ans += (ax / 2);
  cout << ans;
  return 0;
}
