const lines = require('fs') .readFileSync('/dev/stdin', 'utf-8') .trim().split('\n').values(); const N = Number(lines.next().value); const m = new Map(); let ans = 0; for (let i = 0; i < N; i++) { for (let a of lines.next().value.split(' ')) { if (!m.get(a)) { m.set(a, 0); } m.set(a, m.get(a) + 1); if (m.get(a) === 2) { m.delete(a); ans += 1; } } } ans += Math.floor(m.size / 4); console.log(ans);