#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000;
int a[maxn], b[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int ans = 0, nowsum = 0, cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] < 0) {
      nowsum++;
    }
    if (nowsum > 2) {
      ans++;
      b[ans] = cnt;
      nowsum = 1;
      cnt = 0;
    }
    cnt++;
  }
  ans++;
  b[ans] = cnt;
  cout << ans << endl;
  for (int i = 1; i <= ans - 1; i++) cout << b[i] << ' ';
  cout << b[ans] << endl;
}
