#include <bits/stdc++.h>
using namespace std;
const int N = 110;
vector<int> a(N);
int main() {
  int n;
  scanf("%d", &n);
  int cnt = 0, neg = 0, sz = 0;
  vector<int> ans;
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  for (int i = 0; i < n; ++i) {
    int temp = a[i];
    if (temp < 0) {
      neg++;
    }
    sz++;
    if (neg == 3) {
      cnt++;
      sz--;
      ans.push_back(sz);
      sz = 0;
      neg = 0;
      i--;
    }
  }
  if (sz != 0) {
    ans.push_back(sz);
    cnt++;
  }
  printf("%d\n", cnt);
  for (auto it : ans) printf("%d ", it);
  return 0;
}
