#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:500000000")
using namespace std;
vector<int> res;
int a[105], n, i;
int main() {
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  int cnt = 0, j = 0;
  for (i = 0; i < n; i++) {
    if (a[i] < 0) cnt++;
    if (cnt == 3) {
      cnt = 1;
      res.push_back(j);
      j = 0;
    }
    j++;
  }
  res.push_back(j);
  printf("%d\n%d", res.size(), res[0]);
  for (i = 1; i < res.size(); i++) printf(" %d", res[i]);
  puts("");
  return 0;
}
