#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  int neg = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] < 0) neg++;
  }
  if (neg == 0)
    cout << 1 << endl;
  else if (neg % 2 == 0)
    cout << neg / 2 << endl;
  else
    cout << neg / 2 + 1 << endl;
  int temp = 0;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i] < 0) {
      temp++;
    }
    if (temp > 2) {
      cout << ans << " ";
      ans = 0;
      temp = 1;
    }
    ans++;
  }
  cout << ans << endl;
  return 0;
}
