import std.stdio, std.conv, std.string, std.range, std.array, std.algorithm; int main(){ auto I = readln.strip.split.to!(int[]); auto A = I[0]*I[1] - readln.strip.split.to!(int[]).sum; (A<0 ? -1 : A).writeln; return 0; }