#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 10;
int main() {
  int n;
  int a[maxn];
  int b[maxn];
  memset(b, 0, sizeof(b));
  int m = 0, res = 1;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] < 0) {
      if (m == 2) {
        res++;
        m = 1;
      } else {
        m++;
      }
    }
    b[res]++;
  }
  printf("%d\n", res);
  for (int i = 1; i <= res; i++) {
    printf("%d ", b[i]);
  }
  return 0;
}
