#include <bits/stdc++.h>
using namespace std;
vector<int> out;
int c2, cnt, n;
int main() {
  int x;
  while (~scanf("%d", &n)) {
    out.clear();
    c2 = cnt = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &x);
      if (x < 0) {
        if (c2 == 2) {
          out.push_back(cnt);
          c2 = cnt = 0;
        }
        c2++;
      }
      cnt++;
    }
    if (cnt) out.push_back(cnt);
    printf("%d\n", (int)out.size());
    for (int i = 0; i <= (int)out.size() - 1; i++) printf("%d ", out[i]);
    puts("");
  }
  return 0;
}
