#include <bits/stdc++.h>
using namespace std;
int n, a[1000], all = 0, ji1 = 0, ji2 = 0, t;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &t);
    ji2++;
    if (t < 0) ji1++;
    if (ji1 == 3) ji1 = 1, a[++all] = ji2 - 1, ji2 = 1;
    if (i == n) a[++all] = ji2;
  }
  printf("%d\n", all);
  for (int i = 1; i <= all; i++) printf("%d ", a[i]);
  return 0;
}
