using System; using System.Linq; class Program { static void Main(string[] args) { var line1 = Console.ReadLine(); var line2 = Console.ReadLine(); var count = Convert.ToInt32(line1); var values = line2.Split(" ", count); var total = 0; foreach (var i in Enumerable.Range(0, count)) { total += Convert.ToInt32(values[i]); } Console.WriteLine(total.ToString()); } }