using System; using System.Linq; class Program { static void Main() { var N = int.Parse(Console.ReadLine()); var nums = Console.ReadLine().Split(' ').Select(n => int.Parse(n)).Distinct().ToArray(); var calcNums = nums.Where(n => nums.All(a => n == a || n % a != 0)).ToArray(); var calcMinNum = calcNums.Min(); var numCount = calcNums.Sum(n => { var lessThanMeNums = calcNums.Where(c => c < n).ToArray(); if (!lessThanMeNums.Any()) return N / n; var multipliers = Enumerable.Range(1, N / n).ToArray(); return multipliers.Count(m => lessThanMeNums.All(l => m % l != 0)); }); Console.WriteLine(numCount); #if DEBUG Console.Read(); #endif } }