import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.stream.Stream; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); //K N F int[] teisu = Stream.of(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray(); int count = teisu[0] * teisu[1]; //年齢 int sum = Stream.of(br.readLine().split(" ")).mapToInt(Integer::parseInt).sum(); System.out.println((count - sum) > 0 ? count - sum : "-1"); } }