#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 233, mxnode = maxn << 1;
long long add[mxnode], vl[mxnode], vr[mxnode];
int lc[mxnode], rc[mxnode], tot, sz[mxnode], mx2[mxnode], mx1l[mxnode],
    mx1r[mxnode], mx2l[mxnode], mx2r[mxnode];
int L, R, ADD;
int i, j, k, n, m;
int ra;
char rx;
inline int read() {
  rx = getchar(), ra = 0;
  while (rx < '0') rx = getchar();
  while (rx > 47) ra = ra * 10 + rx - 48, rx = getchar();
  return ra;
}
inline void maxs(int &a, int b) {
  if (b > a) a = b;
}
inline int max(int a, int b) { return a > b ? a : b; }
inline void upd(int x) {
  int l = lc[x], r = rc[x];
  vl[x] = vl[l], vr[x] = vr[r],
  mx1l[x] = mx1l[l] + (mx1l[l] == sz[l] && vr[l] > vl[r]) * mx1l[r],
  mx1r[x] = mx1r[r] + (mx1r[r] == sz[r] && vl[r] > vr[l]) * mx1r[l],
  mx2l[x] = mx2l[l] + (mx2l[l] == sz[l] && vr[l] > vl[r]) * mx1l[r];
  if (mx1r[l] == sz[l] && vr[l] < vl[r]) maxs(mx2l[x], sz[l] + mx2l[r]);
  mx2r[x] = mx2r[r] + (mx2r[r] == sz[r] && vl[r] > vr[l]) * mx1r[l];
  if (mx1l[r] == sz[r] && vl[r] < vr[l]) maxs(mx2r[x], sz[r] + mx2r[l]);
  mx2[x] = max(mx2[l], mx2[r]);
  if (vr[l] < vl[r])
    maxs(mx2[x], mx1r[l] + mx2l[r]);
  else if (vr[l] > vl[r])
    maxs(mx2[x], mx2r[l] + mx1l[r]);
}
inline void pushdown(int x) {
  int l = lc[x], r = rc[x];
  long long v = add[x];
  add[x] = 0;
  add[l] += v, vl[l] += v, vr[l] += v, add[r] += v, vl[r] += v, vr[r] += v;
}
void build(int a, int b) {
  int x = ++tot;
  sz[x] = b - a + 1;
  if (a == b) {
    vl[x] = vr[x] = read(), mx2[x] = mx2l[x] = mx2r[x] = mx1l[x] = mx1r[x] = 1;
    return;
  }
  int mid = (a + b) >> 1;
  lc[x] = tot + 1, build(a, mid), rc[x] = tot + 1, build(mid + 1, b), upd(x);
}
void insert(int x, int a, int b) {
  if (L <= a && R >= b) {
    add[x] += ADD, vl[x] += ADD, vr[x] += ADD;
    return;
  }
  if (add[x]) pushdown(x);
  int mid = (a + b) >> 1;
  if (L <= mid) insert(lc[x], a, mid);
  if (R > mid) insert(rc[x], mid + 1, b);
  upd(x);
}
int main() {
  n = read();
  build(1, n);
  for (m = read(); m; m--)
    L = read(), R = read(), ADD = read(), insert(1, 1, n),
    printf("%d\n", mx2[1]);
}
