using System.Collections.Generic; using System; public class Hello { static void Main() { var n = int.Parse(Console.ReadLine().Trim()); string[] line = Console.ReadLine().Trim().Split(' '); var a = Array.ConvertAll(line, int.Parse); getAns(n, a); } static void getAns(int n, int[] a) { var d = new Dictionary(); foreach (var x in a) { if (d.ContainsKey(x)) d[x]++; else d[x] = 1; } var c = 0; foreach (var x in d.Values) c += x / 2; Console.WriteLine(c); } }