using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 競プロ { class Program { static void Main(string[] args) { string s = Console.ReadLine(); var strs = s.Split(' '); int countBean = int.Parse(strs[0]); int countBag = int.Parse(strs[1]); int countFam = int.Parse(strs[2]); int countAllBead = countBean * countBag; s = Console.ReadLine(); strs = s.Split(' '); List ageList = new List(); for (int i = 0; i < countFam; i++) { countAllBead-= int.Parse(strs[i]); } var res = countAllBead > 0 ? countAllBead : -1; Console.WriteLine(res.ToString()); Console.ReadLine(); } } }