#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[1005];
  for (int i = 0; i < n; i++) cin >> a[i];
  int sum = 0, f = 0;
  int ans[105];
  int p = 0;
  int sn = n;
  for (int i = 0; i < n; i++) {
    if (a[i] < 0) f++;
    sum++;
    if (n - 1 == i && f == 0) {
      ans[p - 1] += sum;
      sn -= sum;
    }
    if (f >= 2) {
      ans[p++] = sum;
      sn -= sum;
      sum = 0;
      f = 0;
    }
  }
  if (sn != 0) {
    ans[p++] = sn;
  }
  if (p == 0) {
    p++;
    ans[0] = n;
  }
  cout << p << endl;
  for (int i = 0; i < p; i++) {
    if (i == p - 1)
      cout << ans[i] << endl;
    else
      cout << ans[i] << " ";
  }
}
