#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define Would #define you int main() { int n, k[10005], a, sum = 0; cin >> n; for (int i = 0; i < n; ++i) { cin >> k[i]; sum += k[i]; } cin >> a; cout << sum - a << endl; }