#include <bits/stdc++.h>
using namespace std;
int a[101], b[101], n, d, s;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  s = 0;
  d = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] < 0) s++;
    if (s > 2) {
      d++;
      b[d] = i - 1;
      s = 1;
    }
  }
  if (b[d] != n) {
    cout << d + 1 << endl;
    b[d + 1] = n;
    for (int i = 1; i <= d + 1; i++) cout << b[i] - b[i - 1] << " ";
  } else {
    cout << d << endl;
    for (int i = 1; i <= d; i++) cout << b[i] - b[i - 1] << " ";
  }
}
