#include <bits/stdc++.h>
int reports_[100];
int main() {
  int n;
  std::scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    std::scanf("%d", &reports_[i]);
  }
  std::vector<int> result;
  for (int i = 0; i < n;) {
    int j = i;
    for (int c = 0; j < n && (reports_[j] >= 0 || ++c < 3); ++j)
      ;
    result.push_back(j - i);
    i = j;
  }
  std::printf("%d\n", result.size());
  for (int r : result) {
    std::printf("%d ", r);
  }
  std::printf("\n");
  return 0;
}
