#include <bits/stdc++.h>
using namespace std;
int k[101], t[101];
int main() {
  int n, i, l = 0, z = 0, x = 0;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> k[i];
    l++;
    if (k[i] < 0) z++;
    if (z == 3) {
      x++;
      t[x] = l - 1;
      l = z = 1;
    }
  }
  if (l) {
    x++;
    t[x] = l;
  }
  cout << x << endl;
  for (i = 1; i <= x; i++) cout << t[i] << " ";
}
