#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int lst = 0;
  int cnt = 0;
  vector<int> r;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    if (x < 0) {
      cnt++;
    }
    if (cnt == 3) {
      r.push_back(i - lst);
      lst = i;
      cnt = 1;
    }
  }
  r.push_back(n - lst);
  printf("%d\n", (int)r.size());
  printf("%d", r[0]);
  for (int i = 1; i < r.size(); i++) {
    printf(" %d", r[i]);
  }
  printf("\n");
}
