#include <bits/stdc++.h>
using namespace std;
typedef pair<long long, long long> ll;
typedef vector<long long> vl;
typedef vector<ll> vll;
typedef vector<vl> vvl;
template <typename T>
ostream &operator<<(ostream &o, vector<T> v) {
  if (v.size() > 0) o << v[0];
  for (unsigned i = 1; i < v.size(); i++) o << " " << v[i];
  return o << "\n";
}
template <typename U, typename V>
ostream &operator<<(ostream &o, pair<U, V> p) {
  return o << "(" << p.first << ", " << p.second << ") ";
}
template <typename T>
istream &operator>>(istream &in, vector<T> &v) {
  for (unsigned i = 0; i < v.size(); i++) in >> v[i];
  return in;
}
template <typename T>
istream &operator>>(istream &in, pair<T, T> &p) {
  in >> p.first;
  in >> p.second;
  return in;
}
vl a(300100), b(300100);
struct item {
  long long pref;
  long long suf;
  long long best;
  item() : pref(0), suf(0), best(0) {}
  item(long long _pref, long long _suf, long long _best)
      : pref(_pref), suf(_suf), best(_best) {}
};
item t[300100 * 4];
long long sign(long long n) {
  if (n < 0)
    return -1;
  else if (n > 0)
    return 1;
  else
    return 0;
}
item merge(item x, item y, long long tl, long long tm, long long tr) {
  item res(0, 0, 0);
  res.best = max(x.best, y.best);
  if (sign(b[tm]) <= sign(b[tm + 1])) {
    res.best = max(res.best, x.suf + y.pref);
  }
  res.pref = x.pref;
  if (x.pref == tm - tl + 1 and sign(b[tm]) <= sign(b[tm + 1])) {
    res.pref += y.pref;
  }
  res.suf = y.suf;
  if (y.suf == tr - tm and sign(b[tm]) <= sign(b[tm + 1])) {
    res.suf += x.suf;
  }
  return res;
}
void build(long long node, long long tl, long long tr) {
  if (tl == tr) {
    int o = b[tl] != 0;
    t[node] = item(o, o, o);
    return;
  }
  long long mid = (tl + tr) / 2;
  build(2 * node + 1, tl, mid);
  build(2 * node + 2, mid + 1, tr);
  t[node] = merge(t[2 * node + 1], t[2 * node + 2], tl, mid, tr);
  return;
}
void update(long long node, long long tl, long long tr, long long idx,
            long long val) {
  if (tl == tr) {
    b[tl] += val;
    long long o = b[tl] != 0;
    t[node] = item(o, o, o);
    return;
  }
  long long mid = (tl + tr) / 2;
  if (idx <= mid)
    update(2 * node + 1, tl, mid, idx, val);
  else
    update(2 * node + 2, mid + 1, tr, idx, val);
  t[node] = merge(t[2 * node + 1], t[2 * node + 2], tl, mid, tr);
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(20);
  long long n;
  cin >> n;
  a.resize(n);
  cin >> a;
  b.resize(n - 1);
  for (long long i = (0); i < (long long)n; i++) b[i] = a[i] - a[i + 1];
  if (n != 1) build(0, 0, n - 2);
  long long q;
  cin >> q;
  while (q--) {
    long long l, r, x;
    cin >> l >> r >> x;
    if (n == 1) {
      cout << "1"
           << "\n";
      continue;
    }
    l--;
    r--;
    if (l) update(0, 0, n - 2, l - 1, -x);
    if (r < n - 1) update(0, 0, n - 2, r, x);
    cout << t[0].best + 1 << "\n";
  }
  return 0;
}
