using System.Linq; using System.Collections.Generic; using System; public class Hello { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); string[] line = Console.ReadLine().Trim().Split(' '); var a = Array.ConvertAll(line, int.Parse); var d = new Dictionary(); for (int i = 0; i < n; i++) if (d.ContainsKey(a[i])) d[a[i]]++; else d[a[i]] = 1; Console.WriteLine(d.Count(x => x.Value == 1)); } }