using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Парична_награда { class Program { static void Main(string[] args) { int partsProjects = int.Parse(Console.ReadLine()); double priceForPoint = double.Parse(Console.ReadLine()); var sum = 0; var TotalPrice = 0.0; for (int i = 0; i < partsProjects; i++) { var points = int.Parse(Console.ReadLine()); if (points % 2 == 0) { points= points * 2; } else { points++; } sum +=points; TotalPrice = (sum * priceForPoint) ; } Console.WriteLine($"{TotalPrice:F2}"); } } }