#include <bits/stdc++.h>
using namespace std;
int X[101];
int N, a, ans, t, MAXN;
bool found;
int main() {
  scanf("%d", &N);
  int i, j;
  for (i = 0; i < N; i++) {
    scanf("%d", &a);
    X[a] += 1;
    if (a > MAXN) MAXN = a;
  }
  found = true;
  while (found) {
    found = false;
    for (i = 1; i <= MAXN; i++) {
      if (X[i] >= 2) {
        found = true;
        break;
      }
    }
    if (!found) break;
    found = false;
    for (j = 1; j <= MAXN; j++) {
      if (X[j] >= 2 && j != i) {
        found = true;
        break;
      }
    }
    if (!found) {
      if (X[i] >= 4) ans += (X[i] - X[i] % 4) / 4;
      break;
    }
    ans += (min(X[i], X[j]) - min(X[i], X[j]) % 2) / 2;
    t = (min(X[i], X[j]) - min(X[i], X[j]) % 2);
    X[i] -= t;
    X[j] -= t;
  }
  printf("%d\n", ans);
}
