#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int cnt = 0, cntt = 0;
    int a[105], b[105];
    memset(b, 0, sizeof(b));
    int k = 0, x = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      x++;
      if (a[i] < 0) {
        cnt++;
      }
      if (cnt == 3) {
        cnt = 1;
        cntt++;
        b[k++] = x - 1;
        x = 1;
      }
      if (i == n - 1 && cnt != 3) {
        cntt++;
        b[k++] = x;
      }
    }
    cout << cntt << endl;
    for (int i = 0; i < k; i++) {
      cout << b[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
