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