#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 5;
int n, a[maxn];
vector<int> v;
int main() {
  int t = 0, x = 0;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    t = 0;
    x = 0;
    for (; i < n; i++) {
      if (a[i] < 0 && x == 2) {
        i--;
        break;
      }
      t++;
      if (a[i] < 0) x++;
    }
    v.push_back(t);
  }
  cout << (int)v.size() << endl;
  for (int i = 0; i < (int)v.size(); i++) cout << v[i] << " ";
  cout << endl;
  return 0;
}
