#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, size = 0, a[100], kol = 0, c, kolmin = 0;
  cin >> n;
  for (i = 0; i < n; ++i) {
    cin >> c;
    if (c < 0) {
      if (kolmin == 2) {
        a[size++] = kol;
        kolmin = 1;
        kol = 1;
      } else {
        kolmin++;
        kol++;
      }
    } else {
      kol++;
    }
  }
  cout << size + 1 << endl;
  for (i = 0; i < size; ++i) {
    cout << a[i] << " ";
  }
  cout << kol;
}
