#include <bits/stdc++.h>
using namespace std;
const int M = 1000030;
const int N = 111;
const int inf = 1 << 29;
const double eps = 1e-12;
const double pi = acos(-1.0);
int n;
int rec[N];
int main() {
  while (scanf("%d", &n) == 1) {
    memset(rec, 0, sizeof(rec));
    int cnt = 0, tot = 0;
    for (int i = 0; i < n; i++) {
      int a;
      scanf("%d", &a);
      if (a < 0) {
        if (cnt == 2) {
          cnt = 1;
          tot++;
        } else
          cnt++;
        rec[tot]++;
      } else {
        rec[tot]++;
      }
    }
    printf("%d\n", tot + 1);
    for (int i = 0; i <= tot; i++) printf("%d ", rec[i]);
    puts("");
  }
  return 0;
}
