#include <bits/stdc++.h>
using namespace std;
int main() {
  int T, x;
  int n, m;
  long long ans = 0;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> x;
    if (i != 1) ans += x;
  }
  cout << ans << "\n";
  return 0;
}
