#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  T f = 1;
  x = 0;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = x * 10 + s - '0';
    s = getchar();
  }
  x *= f;
}
const int N = 3e5 + 5;
int n, a[N << 2], m;
struct Segment_Tree {
  int ll[N << 2], rr[N << 2], mx[N << 2], asl[N << 2], asr[N << 2];
  long long lv[N << 2], rv[N << 2], lazy[N << 2];
  inline void pushdown(int rt) {
    lv[rt << 1] += lazy[rt];
    lv[rt << 1 | 1] += lazy[rt];
    rv[rt << 1] += lazy[rt];
    rv[rt << 1 | 1] += lazy[rt];
    lazy[rt << 1] += lazy[rt];
    lazy[rt << 1 | 1] += lazy[rt];
    lazy[rt] = 0;
  }
  inline void pushup(int rt, int l, int r) {
    lv[rt] = lv[rt << 1];
    rv[rt] = rv[rt << 1 | 1];
    mx[rt] = max(mx[rt << 1], mx[rt << 1 | 1]);
    if (ll[rt << 1] == (((l + r) >> 1) - l + 1)) {
      if (lv[rt << 1 | 1] < rv[rt << 1])
        ll[rt] = ll[rt << 1] + ll[rt << 1 | 1];
      else
        ll[rt] = ll[rt << 1];
    } else
      ll[rt] = ll[rt << 1];
    if (rr[rt << 1 | 1] == (r - ((l + r) >> 1))) {
      if (lv[rt << 1 | 1] > rv[rt << 1])
        rr[rt] = rr[rt << 1 | 1] + rr[rt << 1];
      else
        rr[rt] = rr[rt << 1 | 1];
    } else
      rr[rt] = rr[rt << 1 | 1];
    mx[rt] = max(mx[rt << 1], mx[rt << 1 | 1]);
    asl[rt] = asl[rt << 1];
    asr[rt] = asr[rt << 1 | 1];
    if (asl[rt << 1] == (((l + r) >> 1) - l + 1) &&
        lv[rt << 1 | 1] < rv[rt << 1])
      asl[rt] = max(asl[rt], asl[rt << 1] + ll[rt << 1 | 1]);
    if (asr[rt << 1 | 1] == (r - ((l + r) >> 1)) &&
        lv[rt << 1 | 1] > rv[rt << 1])
      asr[rt] = max(asr[rt], asr[rt << 1 | 1] + rr[rt << 1]);
    if (rr[rt << 1] == (((l + r) >> 1) - l + 1) &&
        lv[rt << 1 | 1] > rv[rt << 1])
      asl[rt] = rr[rt << 1] + asl[rt << 1 | 1];
    if (ll[rt << 1 | 1] == (r - ((l + r) >> 1)) &&
        lv[rt << 1 | 1] < rv[rt << 1])
      asr[rt] = ll[rt << 1 | 1] + asr[rt << 1];
    if (lv[rt << 1 | 1] > rv[rt << 1])
      mx[rt] = max(mx[rt], asl[rt << 1 | 1] + rr[rt << 1]);
    if (lv[rt << 1 | 1] < rv[rt << 1])
      mx[rt] = max(mx[rt], asr[rt << 1] + ll[rt << 1 | 1]);
  }
  inline void build(int rt, int l, int r) {
    if (l == r)
      return (void)(asl[rt] = asr[rt] = mx[rt] = ll[rt] = rr[rt] = 1,
                    lazy[rt] = 0, lv[rt] = rv[rt] = a[l]);
    build(rt << 1, l, ((l + r) >> 1));
    build(rt << 1 | 1, ((l + r) >> 1) + 1, r);
    pushup(rt, l, r);
  }
  inline void update(int rt, int l, int r, int L, int R, int ch) {
    if (L <= l && r <= R)
      return (void)(lazy[rt] += ch, lv[rt] += ch, rv[rt] += ch);
    pushdown(rt);
    if (L <= ((l + r) >> 1)) update(rt << 1, l, ((l + r) >> 1), L, R, ch);
    if (R > ((l + r) >> 1))
      update(rt << 1 | 1, ((l + r) >> 1) + 1, r, L, R, ch);
    pushup(rt, l, r);
  }
} t;
inline void solve() {
  read(n);
  for (int i = (1); i <= (n); i++) read(a[i]);
  t.build(1, 1, n);
  read(m);
  for (int i = (1); i <= (m); i++) {
    int l, r, ch;
    read(l);
    read(r);
    read(ch);
    t.update(1, 1, n, l, r, ch);
    printf("%d\n", t.mx[1]);
  }
}
int main() { solve(); }
