#include using namespace std; int main() { int N; cin >> N; map MA; while (cin >> N) MA[N]++; int ans = 0, rem = 0; for (auto [a, b] : MA) ans += b / 2, rem += b % 2; cout << ans + rem / 4 << "\n"; }