#include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; int tAns = 0; vector vec(n); for (auto& i : vec) { cin >> i; tAns += i; } int v; cin >> v; cout << tAns - v << endl; return 0; }