#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j, k;
  int a[1000], b[1000];
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", a + i);
  for (i = m = 0; i < n; i = j) {
    for (k = 0, j = i; j < n; j++) {
      if (a[j] >= 0) continue;
      if (++k == 3) break;
    }
    b[m++] = j - i;
  }
  printf("%d\n", m);
  for (i = 0; i < m; i++) {
    if (i) printf(" ");
    printf("%d", b[i]);
  }
  puts("");
  return 0;
}
