#include <bits/stdc++.h>
using namespace std;
using LL = long long;
constexpr int N = 1e5 + 5;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> ans;
  int cnt = 0, neg = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    neg += (x < 0);
    cnt++;
    if (neg == 3) {
      ans.push_back(cnt - 1);
      cnt = neg = 1;
    }
  }
  if (cnt > 0) ans.push_back(cnt);
  cout << ans.size() << endl;
  for (int x : ans) cout << x << ' ';
}
