#include <bits/stdc++.h>
using namespace std;
queue<int> q;
int main() {
  int num_days;
  int num_directories = 1;
  int num_vals = 0;
  int num_losses = 0;
  cin >> num_days;
  while (num_days--) {
    int profit;
    cin >> profit;
    if (profit < 0) {
      num_losses++;
      if (num_losses == 3) {
        q.push(num_vals);
        num_vals = 0;
        num_directories++;
        num_losses = 1;
      }
    }
    ++num_vals;
  }
  q.push(num_vals);
  cout << num_directories << "\n";
  while (!q.empty()) {
    cout << q.front() << " ";
    q.pop();
  }
  cout << "\n";
  return 0;
}
