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