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