using System; namespace YukiCorderNo29_20170924 { class Program { static void Main(string[] args) { string N; N = Console.ReadLine(); int[] itemBox = new int[Int32.Parse(N) * 3]; for (int i = 1; i <= Int32.Parse(N); i++) { string[] inputItem = Console.ReadLine().Split(' '); for (int j = 0; j < 3; j++) { itemBox[(i - 1) * 3 + j] = Int32.Parse(inputItem[j]); //Console.WriteLine((i - 1) * 3 + j + ": " + itemBox[(i - 1) * 3 + j]); } } int powerUp = 0; int num = 0; int amariNum = 0; for (int i = 1; i <= 10; i++) { num = 0; for (int j = 0; j < itemBox.Length; j++) { if (itemBox[j] == i) { num++; //Console.WriteLine("numAdd:"+ i); } //Console.WriteLine(num); } powerUp += num / 2; amariNum += num % 2; } powerUp += amariNum / 4; Console.WriteLine(powerUp); } } }