#include using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; int truesum = 0, t; REP(i, n) { cin >> t; truesum += t; } int yuki; cin >> yuki; cout << truesum - yuki << endl; return 0; }