local n, a = io.read("*n", "*n") a = a * (n - 1) for i = 1, n do a = a - io.read("*n") end print(-a)