#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> mm;
  int n;
  cin >> n;
  int l = 0;
  int d = 0;
  for (int i = 0; i < n; i++) {
    l++;
    int a;
    cin >> a;
    if (a < 0) d++;
    if (d == 3) {
      d = 1;
      mm.push_back(l - 1);
      l = 1;
    }
  }
  mm.push_back(l);
  cout << mm.size() << endl;
  for (int i = 0; i < mm.size(); i++) cout << mm[i] << " ";
  cout << endl;
  return 0;
}
