#include using namespace std; typedef long long LL; int main() { // 1. 入力情報取得. LL N, V; cin >> N; LL total = 0LL; for(int i = 0; i < N; i++){ LL a; cin >> a; total += a; } cin >> V; // 2. 本当の答え. LL ans = total - V; // 3. 後処理. cout << ans << endl; return 0; }