#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> stop(n);
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    cnt += (a[i] < 0);
    if (cnt == 3) {
      stop[i - 1] = 1;
      cnt = 1;
    }
  }
  stop[n - 1] = 1;
  vector<int> ret;
  int k = 0;
  for (int i = 0; i < n; i++) {
    if (stop[i]) {
      ret.push_back(i - k + 1);
      k = i + 1;
    }
  }
  cout << (int)ret.size() << '\n';
  for (int k : ret) {
    cout << k << " ";
  }
  cout << '\n';
  return 0;
}
