#include <bits/stdc++.h>
using namespace std;
int N;
int x, tmp, sol;
map<int, int> C;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << setprecision(10) << fixed;
  cin >> N;
  for (int I = 0; I < N; I++) cin >> x, C[x]++;
  for (typeof((C).begin()) it = (C).begin(); it != (C).end(); it++) {
    sol += it->second / 4;
    if ((it->second % 4) >= 2) tmp++;
  }
  sol += tmp / 2;
  cout << sol << endl;
}
