#include <bits/stdc++.h>
using namespace std;
const long long int N = 100005;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  {
    long long int i, j, k, n, m, ans = 0, cnt = 0, sum = 0;
    cin >> n;
    vector<long long int> v;
    long long int a[n];
    j = 0;
    ans = 0;
    for (i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] < 0) {
        j++;
        if (j == 3) {
          v.push_back(i - ans);
          cnt++;
          ans = i;
          j = 1;
        }
      }
      if (i == n - 1) {
        v.push_back(i - ans + 1);
        cnt++;
      }
    }
    cout << max((long long int)1, cnt) << endl;
    for (auto x : v) {
      cout << x << " ";
    }
  }
}
