#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  vector<int> folder[100];
  cin >> n;
  int tmp = 0, m = 0;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x < 0) {
      tmp++;
      if (tmp > 2) {
        m++;
        tmp = 1;
      }
    }
    folder[m].push_back(x);
  }
  cout << m + 1 << endl;
  for (int i = 0; i <= m; i++) {
    cout << folder[i].size() << " ";
  }
  return 0;
}
