#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &n) {
  n = 0;
  T f = 1;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-') f = -1, c = getchar();
  while (isdigit(c)) n = n * 10 + c - '0', c = getchar();
  n *= f;
}
template <typename T>
void write(T n) {
  if (n < 0) putchar('-'), n = -n;
  if (n > 9) write(n / 10);
  putchar(n % 10 + '0');
}
struct node {
  int l, r;
  long long vl, vr;
  int sl, sr, pl, pr, mxl, mxr, ans;
  friend node operator+(node a, node b) {
    node c;
    c.l = a.l, c.r = b.r, c.vl = a.vl, c.vr = b.vr;
    c.pl = a.pl, c.pr = b.pr;
    if (a.pl == (a.r - a.l + 1) && a.vr < b.vl) c.pl = a.pl + b.pl;
    if (b.pr == (b.r - b.l + 1) && b.vl < a.vr) c.pr = b.pr + a.pr;
    c.sl = a.sl, c.sr = b.sr;
    if (a.sl == (a.r - a.l + 1) && a.vr > b.vl) c.sl = a.sl + b.sl;
    if (b.sr == (b.r - b.l + 1) && b.vl > a.vr) c.sr = b.sr + a.sr;
    c.mxl = a.mxl, c.mxr = b.mxr;
    if (a.mxl == (a.r - a.l + 1) && b.vl < a.vr) c.mxl = a.mxl + b.sl;
    if (b.mxr == (b.r - b.l + 1) && a.vr < b.vl) c.mxr = b.mxr + a.sr;
    if (a.pl == (a.r - a.l + 1) && a.vr < b.vl)
      c.mxl = max(c.mxl, a.pl + b.mxl);
    if (b.pr == (b.r - b.l + 1) && a.vr > b.vl)
      c.mxr = max(c.mxr, a.mxr + b.pr);
    c.ans = max(a.ans, b.ans);
    c.ans = max(c.ans, max(c.mxl, c.mxr));
    if (a.vr < b.vl)
      c.ans = max(c.ans, a.sr + b.mxl);
    else if (a.vr > b.vl)
      c.ans = max(c.ans, a.mxr + b.sl);
    if (a.vr != b.vl) c.ans = max(c.ans, a.sr + b.sl);
    return c;
  }
} s[1200005];
int n, m;
int a[1200005];
long long tag[1200005];
void build(int p, int l, int r) {
  if (l == r) {
    s[p] = (node){l, l, a[l], a[l], 1, 1, 1, 1, 1, 1, 1};
    return;
  }
  build((p << 1), l, ((l + r) >> 1)),
      build((p << 1 | 1), ((l + r) >> 1) + 1, r);
  s[p] = s[(p << 1)] + s[(p << 1 | 1)];
}
void push_down(int p) {
  tag[(p << 1)] += tag[p], tag[(p << 1 | 1)] += tag[p];
  s[(p << 1)].vl += tag[p], s[(p << 1 | 1)].vl += tag[p];
  s[(p << 1)].vr += tag[p], s[(p << 1 | 1)].vr += tag[p];
  tag[p] = 0;
}
void update(int p, int l, int r, int ul, int ur, long long k) {
  if (l >= ul && r <= ur) {
    s[p].vl += k, s[p].vr += k;
    tag[p] += k;
    return;
  }
  push_down(p);
  if (((l + r) >> 1) >= ul) update((p << 1), l, ((l + r) >> 1), ul, ur, k);
  if (((l + r) >> 1) < ur)
    update((p << 1 | 1), ((l + r) >> 1) + 1, r, ul, ur, k);
  s[p] = s[(p << 1)] + s[(p << 1 | 1)];
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) read(a[i]);
  build(1, 1, n);
  cin >> m;
  int l, r;
  long long k;
  while (m--) {
    read(l), read(r), read(k);
    update(1, 1, n, l, r, k);
    write(s[1].ans), puts("");
  }
  return 0;
}
