#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 1; i <= n; i++) cin >> a[i];
  int c = 0, t = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] < 0) {
      c++;
    } else {
      t++;
    }
  }
  if (t == n || n == 1) {
    cout << "1" << endl << n << endl;
    return 0;
  }
  if (c % 2 == 0)
    cout << c / 2 << endl;
  else
    cout << c / 2 + 1 << endl;
  int f = 0, d = 0;
  for (int i = 1; i < n; i++) {
    if (a[i] < 0) {
      d++;
    }
    if (d == 2 && a[i + 1] < 0) {
      cout << i - f << " ";
      f = i;
      d = 0;
    }
  }
  cout << n - f << endl;
  return 0;
}
