#include <bits/stdc++.h>
int main() {
  int n;
  int a[200000];
  std::cin >> n;
  ;
  int i, j;
  for (i = 0; i < n; i++) {
    std::cin >> a[i];
  }
  int start = 0;
  int length = 2;
  int count = 0;
  int sum = 0;
  while (length <= n) {
    for (start = 0; start <= n - length; start++) {
      for (i = 0; i < length; i++) {
        sum = sum + a[start + i];
      }
      if (sum == 0) {
        count++;
      }
      std::cout << start << std::endl;
    }
    length++;
    sum = 0;
  }
  return 0;
}
