using System; using System.Linq; namespace Yukicoder { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int[] list = new int[10]; for (int i = 0; i < N; i++) { var data = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); foreach (var d in data) { list[d - 1]++; } } int powerup = 0; int subPowerup = 0; foreach(var l in list) { powerup += l / 2; if (l % 2 == 1) subPowerup++; } Console.WriteLine(powerup + (subPowerup / 4)); } } }