#include <bits/stdc++.h>
using namespace std;
int a[105], b[105];
int main() {
  int i, j, n, d, ans, k;
  while (~scanf("%d", &n)) {
    for (i = 0; i < n; i++) scanf("%d", &a[i]);
    ans = 0;
    d = 0;
    k = 0;
    for (i = 0, j = 0; i < n; i++) {
      if (a[i] < 0) {
        if (d == 2) {
          ans++;
          b[j++] = i - k;
          k = i;
          d = 0;
        }
        d++;
      }
    }
    if (k < n) {
      b[j++] = n - k;
      ans++;
    }
    printf("%d\n", ans);
    for (i = 0; i < j; i++) {
      if (i == j - 1)
        printf("%d\n", b[i]);
      else
        printf("%d ", b[i]);
    }
  }
}
