#include <bits/stdc++.h>
using namespace std;
int n, cnt, x;
vector<int> ans;
int main() {
  scanf("%d", &n);
  int cnt = 0;
  ans.push_back(0);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    if (x < 0) cnt++;
    if (cnt <= 2)
      ans[ans.size() - 1]++;
    else {
      ans.push_back(1);
      cnt = 1;
    }
  }
  printf("%d\n%d", ans.size(), ans[0]);
  for (int i = 1; i < ans.size(); i++) printf(" %d", ans[i]);
  printf("\n");
  return 0;
}
