#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, sum[200002] = {};
  cin >> N;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    sum[i + 1] += a + sum[i];
  }
  int ret = -numeric_limits<int>::max(), pv = 0;
  for (int i = N - 1; i > 0; i--) {
    ret = max(ret, sum[i + 1] - pv);
    pv = ret;
  }
  cout << ret << endl;
}
