#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 10;
int n, a[maxn], cnt = 0, ted[maxn], bad[maxn];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (a[i] < 0 && bad[cnt] == 2) cnt++;
    if (a[i] < 0) bad[cnt]++;
    ted[cnt]++;
  }
  if (ted[cnt] != 0) cnt++;
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) cout << ted[i] << ' ';
  cout << endl;
  return 0;
}
