#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n;
  int a[n];
  int count = 0, index = 0, neg = 0;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x >= 0)
      count++;
    else {
      neg++;
      if (neg == 3) {
        a[index] = count;
        neg = 1;
        count = 1;
        index++;
      } else {
        count++;
      }
    }
  }
  a[index] = count;
  cout << index + 1 << endl;
  for (int i = 0; i <= index; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
  return 0;
}
