#include <bits/stdc++.h>
using namespace std;
char In[1 << 25], *ss = In, *tt = In;
inline long long read() {
  register long long x = 0, f = 1;
  register char ch =
      (ss == tt && (tt = (ss = In) + fread(In, 1, 1 << 25, stdin), ss == tt)
           ? EOF
           : *ss++);
  while (ch < '0' || ch > '9')
    f = (ch == '-') ? -1 : f,
    ch = (ss == tt && (tt = (ss = In) + fread(In, 1, 1 << 25, stdin), ss == tt)
              ? EOF
              : *ss++);
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + (ch ^ 48),
    ch = (ss == tt && (tt = (ss = In) + fread(In, 1, 1 << 25, stdin), ss == tt)
              ? EOF
              : *ss++);
  return x * f;
}
long long n, a[300005], m, x, y, d;
struct node {
  long long len, l_val, r_val, l_end, r_end, l_down, r_up, ans, l, r, tag;
} f[300005 << 2];
node operator+(node a, node b) {
  node c;
  c.l = a.l;
  c.r = b.r;
  c.tag = 0;
  c.len = a.len + b.len;
  c.l_val = a.l_val;
  c.r_val = b.r_val;
  c.l_down = a.l_down;
  c.r_up = b.r_up;
  c.ans = max(a.ans, b.ans);
  c.l_end = a.l_end;
  c.r_end = b.r_end;
  if (a.r_val > b.l_val) {
    if (a.l_down == a.len) c.l_down = max(c.l_down, b.l_down + a.l_down);
    if (a.l_end == a.len) c.l_end = max(c.l_end, a.l_end + b.l_down);
    if (b.l_down == b.len) c.r_end = max(c.r_end, b.l_down + a.r_end);
    c.ans = max(c.ans, a.r_end + b.l_down);
  }
  if (a.r_val < b.l_val) {
    if (b.r_up == b.len) c.r_up = max(c.r_up, b.r_up + a.r_up);
    if (b.r_end == b.len) c.r_end = max(c.r_end, a.r_up + b.r_end);
    if (a.r_up == a.len) c.l_end = max(c.r_end, b.l_end + a.r_up);
    c.ans = max(c.ans, a.r_up + b.l_end);
  }
  return c;
}
void build(long long x, long long l, long long r) {
  f[x].l = l;
  f[x].r = r;
  if (l == r) {
    f[x].l_val = f[x].r_val = a[l];
    f[x].ans = f[x].l_end = f[x].r_end = f[x].l_down = f[x].r_up = f[x].len = 1;
    return;
  }
  long long mid = l + r >> 1;
  build(x << 1, l, mid);
  build(x << 1 | 1, mid + 1, r);
  f[x] = f[x << 1] + f[x << 1 | 1];
}
void push(long long x) {
  if (!f[x].tag) return;
  long long p = f[x].tag;
  f[x << 1].tag += p;
  f[x << 1 | 1].tag += p;
  f[x << 1].l_val += p;
  f[x << 1 | 1].r_val += p;
  f[x << 1].r_val += p;
  f[x << 1 | 1].l_val += p;
  f[x].tag = 0;
}
void ch(long long x, long long l, long long r, long long k) {
  if (l > f[x].r || r < f[x].l) return;
  if (l <= f[x].l && f[x].r <= r) {
    f[x].tag += k;
    f[x].l_val += k;
    f[x].r_val += k;
    return;
  }
  push(x);
  ch(x << 1, l, r, k);
  ch(x << 1 | 1, l, r, k);
  f[x] = f[x << 1] + f[x << 1 | 1];
}
signed main() {
  n = read();
  for (long long i = 1; i <= n; i++) a[i] = read();
  build(1, 1, n);
  m = read();
  while (m--) {
    x = read();
    y = read();
    d = read();
    ch(1, x, y, d);
    printf("%lld\n", f[1].ans);
  }
}
