#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, x, neg, sz, k;
  vector<int> ans;
  while (cin >> N) {
    neg = 0;
    sz = 0;
    ans.clear();
    for (int i = 0; i < N; i++) {
      cin >> x;
      if (x < 0) neg++;
      if (neg == 3) {
        ans.push_back(sz);
        neg = 1;
        sz = 1;
      } else
        sz++;
    }
    ans.push_back(sz);
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
    cout << endl;
  }
  return 0;
}
