#include <bits/stdc++.h>
using namespace std;
int n, a[20000];
vector<int> v;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  int cnt = 0, neg = 0;
  for (int i = 1; i <= n; ++i) {
    if (a[i] >= 0)
      cnt++;
    else {
      cnt++;
      neg++;
      if (neg == 3) {
        v.push_back(cnt - 1);
        --i;
        neg = 0;
        cnt = 0;
      }
    }
  }
  if (cnt > 0) v.push_back(cnt);
  printf("%d\n", v.size());
  for (typeof(v.begin()) it = v.begin(); it != v.end(); ++it) {
    printf("%d ", *it);
  }
  return 0;
}
