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