#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int temp;
  int count_neg{};
  int count_all{};
  vector<int> folder;
  for (int i = 0; i < n; ++i) {
    cin >> temp;
    ++count_all;
    if (temp < 0) ++count_neg;
    if (count_neg == 3) {
      folder.push_back(count_all - 1);
      count_all = 1;
      count_neg = 1;
    }
  }
  folder.push_back(count_all);
  cout << folder.size() << "\n";
  for (auto itr : folder) cout << itr << " ";
  cout << "\n";
  return 0;
}
