#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  cin >> n;
  int a;
  int res[100] = {0};
  int countn = 0;
  int j = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &a);
    if (a >= 0)
      res[j]++;
    else {
      if (countn < 2) {
        res[j]++;
        countn++;
      } else {
        res[++j]++;
        countn = 1;
      }
    }
  }
  printf("%d\n", ++j);
  for (i = 0; i < j; i++) printf("%d ", res[i]);
}
