#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
int a[101];
int ans[101];
int main() {
  int n;
  while (cin >> n) {
    for (int i = 1; i <= n; ++i) {
      cin >> a[i];
    }
    int num = 0, sum = 0, k = 0;
    for (int i = 1; i <= n; ++i) {
      k++;
      if (a[i] < 0) sum++;
      if (sum == 2) {
        ans[++num] = k;
        sum = 0;
        k = 0;
      }
    }
    if (k) {
      if (num == 0)
        ans[++num] = k;
      else {
        if (sum == 0)
          ans[num] += k;
        else
          ans[++num] = k;
      }
    }
    cout << num << endl;
    for (int i = 1; i <= num; ++i) cout << ans[i] << ' ';
    cout << endl;
  }
  return 0;
}
