using System; using System.Collections.Generic; using System.Linq; public class Program { public static void Main(string[] args) { var map = new Dictionary(); var n = int.Parse(Console.ReadLine()); int[] items; for (var i=0; i int.Parse(x)).ToArray(); foreach (var data in items) { if (map.ContainsKey(data)) map[data]++; else map.Add(data, 1); } } var moreTwos = map.Values.Where(x => x >= 2).ToList(); var ones = map.Values.Where(x => x == 1).ToList(); int count = moreTwos.Sum() / 2 + ones.Sum() / 4; Console.WriteLine(count); } }