#include <bits/stdc++.h>
using namespace std;
int n, x, m, t, cnt, r[105];
int main() {
  scanf("%d", &n);
  for (int i = (0); i <= (n); i++) {
    ++cnt;
    if (i < n) scanf("%d", &x);
    if (x < 0) ++t;
    if (t == 3 || i == n) {
      r[m++] = cnt - 1;
      cnt = t = 1;
    }
  }
  printf("%d\n", m);
  for (int i = (0); i < (m); i++) printf("%d ", r[i]);
  return 0;
}
