using System; namespace StudyApp { class Program { static void Main(string[] args) { int enemy_num = int.Parse(Console.ReadLine()); int[] items = new int[10]; int powerUp = 0; for (int i = 0; i < enemy_num; i++) { string[] inputs = Console.ReadLine().Split(' '); foreach (var data in inputs) { items[int.Parse(data) - 1] += 1; if (items[int.Parse(data) - 1] >= 2) { powerUp++; items[int.Parse(data) - 1] -= 2; } } } int total = 0; foreach (var value in items) { total += value; } powerUp += total / 4; Console.WriteLine(powerUp); } } }