#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const long long INF = 1000 * 1000 * 1000 + 7;
const long long LINF = INF * (long long)INF;
const int MAX = 100 + 47;
int A[MAX];
vector<int> B;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = (0); i < (n); i++) cin >> A[i];
  int cnt = 0;
  int vid = 0;
  for (int i = (0); i < (n + 1); i++) {
    if ((A[i] < 0 && vid == 2) || i == n) {
      B.push_back(cnt);
      cnt = 1;
      vid = 1;
      continue;
    }
    cnt++;
    if (A[i] < 0) vid++;
  }
  cout << (int)B.size() << endl;
  for (int i = (0); i < ((int)B.size()); i++) {
    cout << B[i] << " ";
  }
  cout << endl;
}
