#include <bits/stdc++.h>
using namespace std;
void solve() {
  map<long long, long long> mp, mp1;
  vector<long long> v;
  long long n, m, j, i, y, z, l, r, x, k;
  cin >> n;
  long long a[n + 1];
  long long sum = 0;
  long long c = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < 0) c++;
  }
  if (c <= 2) {
    cout << 1 << endl << n << endl;
    return;
  }
  c = 0;
  x = 0;
  long long sum1 = 0;
  for (i = 0; i < n; i++) {
    if (a[i] < 0) c++;
    x++;
    if (c == 2) {
      v.push_back(x);
      x = 0;
      c = 0;
    }
  }
  if (c > 0) {
    v.push_back(x);
  }
  long long len = v.size();
  cout << len << endl;
  for (i = 0; i < v.size(); i++) {
    sum1 += v[i];
  }
  v[len - 1] += (n - sum1);
  for (i = 0; i < len; i++) {
    cout << v[i] << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T = 1;
  while (T--) solve();
  return 0;
}
