#include <bits/stdc++.h>
using namespace std;
bool myUnique(int i, int j) { return (i == j); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> a(n + 1), s(n + 1, 0), sums;
  map<int, vector<int> > m;
  sums.push_back(0);
  m[0].push_back(0);
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    s[i] = s[i - 1] + a[i];
    m[s[i]].push_back(i);
    sums.push_back(s[i]);
  }
  vector<int> b;
  sort(sums.begin(), sums.end());
  for (int i = 0; i < sums.size(); ++i) {
    int val = sums[i];
    b.push_back(val);
    int j = i + 1;
    while (sums[j] == val) ++j;
    i = j;
  }
  vector<long long> f;
  f.push_back(1LL);
}
