package main import ( "fmt" ) func sum(nums ...int) int { // fmt.Print(nums, " ") total := 0 for _, num := range nums { total += num } return total } func main() { var K, N, F int fmt.Scan(&K, &N, &F) var a []int for i := 0; i < F; i++{ var c int fmt.Scan(&c) a = append(a, c) } // fmt.Print(a) // var sum_a int // sum_a = sum(a...) // fmt.Println(sum_a) // fmt.Println(sum(a...)) var ans int ans = K * N - sum(a...) if ans >= 0 { fmt.Print(ans) } else { fmt.Print("-1") } }