#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 + 10;
int n, k, a[MAXN], s[MAXN];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int g = n, t = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] < 0) t++;
    if (t > 2) {
      t = 1;
      k++;
    }
    s[k]++;
  }
  k++;
  cout << k << endl;
  for (int i = 0; i < k; i++) cout << s[i] << " ";
  cout << endl;
  return 0;
}
