using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace template { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] item = new int[11]; for (int i = 0; i < n; i++) { int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray(); for (int j = 0; j < 3; j++) { item[x[j]]++; } } int ret = 0; for (int i = 1; i <= 10; i++) { ret += item[i] / 2; item[i] %= 2; } ret += item.Sum() / 4; Console.WriteLine(ret); } } }