#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, mCounter = 0;
  vector<int> v, tmp;
  vector<int>::iterator it;
  vector<vector<int> > r;
  int a;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    v.push_back(a);
  }
  for (int i = 0; i < v.size(); i++) {
    if (v[i] < 0 and mCounter == 2) {
      r.push_back(tmp);
      tmp.resize(0);
      tmp.push_back(v[i]);
      mCounter = 1;
    } else if (v[i] < 0 and mCounter < 2) {
      tmp.push_back(v[i]);
      mCounter++;
    } else {
      tmp.push_back(v[i]);
    }
    if (i == v.size() - 1) r.push_back(tmp);
  }
  cout << r.size() << endl;
  for (int i = 0; i < r.size(); i++) cout << r[i].size() << " ";
  cout << endl;
  return 0;
}
