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