using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace foryuki { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); List s = ConvertStringArrayToIntList(Console.ReadLine().Split()); for (int i = 0; i < s.Count; i++) { var Q = from word in s where word == s[i] select word; if (Q.Count() > 1) { s.RemoveAll(x => x == s[i]); i -= 1; } } Console.WriteLine(s.Count); } //------------------------------------------------------------- static int[] ConvertStringArrayToIntArray(string[] str) { int[] b = Array.ConvertAll(str, delegate(string value) { return int.Parse(value); }); return b; } static List ConvertStringArrayToIntList(string[] str) { var list = new List(); foreach (var c in str) { list.Add(int.Parse(c)); } return list; } } }