#include <bits/stdc++.h>
using namespace std;
int N, A;
vector<int> X;
int main(void) {
  cin.sync_with_stdio(0);
  cin >> N;
  int Curr = 0, __Cnt = 0;
  for (int i = 0; i < N; i++) {
    cin >> A;
    if (A < 0) {
      if (__Cnt == 2) {
        __Cnt = 0;
        X.push_back(Curr);
        Curr = 0;
      }
      __Cnt++;
    }
    Curr++;
  }
  if (Curr) X.push_back(Curr);
  int Cnt = X.size();
  cout << Cnt << endl;
  for (int i = 0; i < Cnt; i++) {
    if (i) cout << " ";
    cout << X[i];
  }
  cout << endl;
  return 0;
}
