#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  std::vector<int> v;
  v.push_back(0);
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i] < 0) {
      cnt++;
    }
    if (cnt == 3) {
      v.push_back(i);
      cnt = 1;
    }
  }
  v.push_back(n);
  cout << v.size() - 1 << "\n";
  for (int i = 0; i < v.size() - 1; i++) {
    cout << v[i + 1] - v[i] << " ";
  }
}
