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(); Console.WriteLine(KNF[0] * KNF[1] - A.Sum() < 0 ? -1 : KNF[0] * KNF[1] - A.Sum()); } }