#include <bits/stdc++.h> int main(int argc, char *argv[]) { int len, val, neg, pos, res; neg = pos = res = 0; std::cin >> len; for (int i = 0; i < len; ++i) { std::cin >> val; if (val > 0) { ++pos; neg = neg == 0 ? 0 : neg + 1; } else if (val < 0) { int tmp = neg; neg = pos + 1; pos = tmp == 0 ? 0 : tmp + 1; } else { neg = pos = 0; } res = std::max(res, pos); } std::cout << res << std::endl; return 0; }