#include <bits/stdc++.h>
int main() {
  int n, i = 0, num = 0, count = 0;
  int a[110] = {0}, b[100] = {0};
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (num >= 2 && a[i] > 0) {
      b[count]++;
      continue;
    }
    if (num >= 2 && a[i] < 0) {
      num = 0;
      count++;
    }
    if (a[i] < 0) num++;
    b[count]++;
  }
  printf("%d\n", count + 1);
  for (i = 0; i <= count; i++) printf("%d ", b[i]);
  return 0;
}
