#include <bits/stdc++.h>
int prime[1000000 + 5], in;
bool isp[1000000 + 5];
using namespace std;
int d4[] = {-1, 0, 1, 0};
int y4[] = {0, -1, 0, 1};
int dx[] = {1, -1, 0, 0, -1, 1, 1, -1};
int dy[] = {1, -1, 1, -1, 0, 0, -1, 1};
int dxh[] = {1, -1, 1, -1, 2, 2, -2, -2};
int dyh[] = {2, 2, -2, -2, 1, -1, 1, -1};
int mat[1005][1005], val[1005][1005];
void reset() {
  for (int i = 0; i < 1005; i++) {
    memset(mat[i], 0, sizeof(mat[i]));
    memset(val[i], 0, sizeof(val[i]));
  }
}
long long ar[10000];
int main() {
  int n;
  while (cin >> n) {
    for (int i = 0; i < n; i++) cin >> ar[i];
    vector<long long> vec;
    int cnt = 0;
    long long sum = 0;
    int tm;
    if (n == 1) vec.push_back(1);
    for (int i = 0; i < n; i++) {
      if (ar[i] < 0) cnt++;
      sum++;
      if (cnt == 3) {
        vec.push_back(sum - 1);
        sum = 1;
        cnt = 1;
        tm = i;
      }
    }
    if (tm == n - 1)
      vec.push_back(sum);
    else if (sum != 1)
      vec.push_back(sum);
    cout << vec.size() << endl;
    for (int i = 0; i < vec.size(); i++) {
      if (i) cout << " ";
      cout << vec[i];
    }
    cout << endl;
  }
  return 0;
}
