#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, total = 0, num, Count = 0, pos = -1;
  vector<int> V;
  cin >> n;
  for (i = 0; i < n; i++) {
    Count++;
    cin >> num;
    if (num < 0) total++;
    if (total == 2) {
      V.push_back(Count);
      pos = i;
      Count = 0;
      total = 0;
    }
  }
  if (pos != -1) {
    if (n - 1 != pos && total == 0)
      V[V.size() - 1] = V[V.size() - 1] + n - pos - 1;
    else if (total == 1 && n - 1 != pos)
      V.push_back(n - pos - 1);
  } else
    V.push_back(n);
  cout << V.size() << endl;
  for (i = 0; i < V.size(); i++) cout << V[i] << " ";
  return 0;
}
