#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, a[101], p = 0, k = 0, b[101], q = 0;
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n; i++) {
    if (a[i] < 0 && k == 2) {
      b[q++] = i - p;
      p = i;
      k = 0;
    }
    if (a[i] < 0) k++;
  }
  b[q++] = n - p;
  cout << q << endl;
  for (i = 0; i < q; i++) cout << b[i] << " ";
  return 0;
}
