using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int level = 0; List list = new List(); List items = new List(); for (int i = 0; i < N; i++) { list.AddRange(Console.ReadLine().Split(' ')); } foreach (String con in list) { if (!items.Contains(con)) { items.Add(con); } else { items.Remove(con); level++; } } level = level + items.Count / 4; Console.WriteLine(level); } } }