#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> segs;
  int numNeg = 0;
  int curLen = 0;
  for (int i = 0; i < n; i++) {
    int a;
    scanf("%d", &a);
    if (a < 0) {
      if (numNeg == 2) {
        segs.push_back(curLen);
        curLen = 1;
        numNeg = 1;
      } else {
        numNeg += 1;
        curLen += 1;
      }
    } else {
      curLen += 1;
    }
  }
  if (curLen != 0) {
    segs.push_back(curLen);
  }
  printf("%d\n", segs.size());
  for (int s : segs) {
    printf("%d ", s);
  }
  return 0;
}
