using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { int[] KNF = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray(); int[] A = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray(); int bean = KNF[0] * KNF[1]; int ageSum = A.Sum(); if (bean - ageSum < 0) { Console.WriteLine(-1); } else { Console.WriteLine(bean - ageSum); } } }