package main import ( "bufio" "fmt" "os" "strconv" ) func main() { var N, v int fmt.Scan(&N) A := make([]int, N) sc := bufio.NewScanner(os.Stdin) sc.Split(bufio.ScanWords) sum := 0 for i := range A { sc.Scan() A[i], _ = strconv.Atoi(sc.Text()) sum += A[i] } fmt.Scan(&v) fmt.Println(sum - v) }