#include <bits/stdc++.h>
using namespace std;
int a[1000], b[1000];
int main() {
  if (0) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  };
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int dem = 0, k = 0;
  b[0] = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] < 0) {
      dem++;
      if (dem > 2) {
        k++;
        b[k] = i - 1;
        dem = 1;
      }
    }
  k++;
  b[k] = n;
  printf("%d\n", k);
  for (int i = 1; i <= k; i++) printf("%d ", b[i] - b[i - 1]);
  return 0;
}
