#include <bits/stdc++.h>
using namespace std;
struct classcomp {
  bool operator()(const int& lhs, const int& rhs) const { return lhs < rhs; }
};
int gcd(long long x, long long y) { return (y == 0) ? x : gcd(y, x % y); }
string convertint(int x) {
  stringstream ss;
  ss << x;
  return ss.str();
}
bool first(pair<int, int> p1, pair<int, int> p2) {
  return p1.second - p1.first > p2.second - p2.first;
}
bool ff(int a, int b) { return a > b; }
int a[105];
int main(void) {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  vector<int> v;
  int t = 0;
  int k = 0;
  for (int i = 0; i < n; i++)
    if (a[i] < 0) {
      if (k == 2) {
        v.push_back(t);
        t = 1;
        k = 1;
      } else {
        t++;
        k++;
      }
    } else
      t++;
  if (t > 0) v.push_back(t);
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  return 0;
}
