using System; using System.Collections.Generic; namespace lecture { class MainClass { public static void Main(string[] args) { string row = Console.ReadLine(); int N = int.Parse(row); row = Console.ReadLine(); // 空白区切りで一旦文字列の配列に区切る string[] tmp = row.Split(); Dictionary novelty = new Dictionary(); for (int i = 0; i < N; i++) { string number = tmp[i]; if (novelty.ContainsKey(number)) { novelty[number]++; } else { novelty[number] = 1; } } int noveltyCnt = 0; foreach (int cnt in novelty.Values) { if (cnt == 1) { noveltyCnt++; } } Console.WriteLine(noveltyCnt); } } }