#include <bits/stdc++.h>
const int N = 3e5 + 50;
int n, m, x, y;
long long z;
int mx[N << 3];
int mxl1[N << 3], mxr1[N << 3];
int mxl2[N << 3], mxr2[N << 3];
long long vl[N << 3], vr[N << 3];
long long bj[N << 3];
inline int max(int u, int v) { return u > v ? u : v; }
void gx(int now, int ls, int rs) {
  int noww = now << 1, nrs = ls + rs >> 1;
  vl[now] = vl[noww];
  vr[now] = vr[noww | 1];
  mxl1[now] = mxl1[noww];
  if (mxl1[noww] == nrs - ls + 1 && vr[noww] > vl[noww | 1])
    mxl1[now] += mxl1[noww | 1];
  mxr1[now] = mxr1[noww | 1];
  if (mxr1[noww | 1] == rs - nrs && vr[noww] < vl[noww | 1])
    mxr1[now] += mxr1[noww];
  mxl2[now] = mxl2[noww];
  if (mxl2[noww] == nrs - ls + 1 && vr[noww] > vl[noww | 1])
    mxl2[now] += mxl1[noww | 1];
  if (mxr1[noww] == nrs - ls + 1 && vr[noww] < vl[noww | 1])
    mxl2[now] = max(mxl2[now], mxr1[noww] + mxl2[noww | 1]);
  mxr2[now] = mxr2[noww | 1];
  if (mxr2[noww | 1] == rs - nrs && vr[noww] < vl[noww | 1])
    mxr2[now] += mxr1[noww];
  if (mxl1[noww | 1] == rs - nrs && vr[noww] > vl[noww | 1])
    mxr2[now] = max(mxr2[now], mxl1[noww | 1] + mxr2[noww]);
  mx[now] = max(mx[noww], mx[noww | 1]);
  mx[now] = max(mx[now], max(mxl1[now], mxr1[now]));
  mx[now] = max(mx[now], max(mxl2[now], mxr2[now]));
  if (vr[noww] < vl[noww | 1])
    mx[now] = max(mx[now], mxr1[noww] + mxl2[noww | 1]);
  if (vr[noww] > vl[noww | 1])
    mx[now] = max(mx[now], mxr2[noww] + mxl1[noww | 1]);
}
void mktree(int now, int ls, int rs) {
  if (ls == rs) {
    scanf("%d", &x);
    vl[now] = vr[now] = x;
    mx[now] = mxl1[now] = mxl2[now] = mxr1[now] = mxr2[now] = 1;
    return;
  }
  int noww = now << 1, nrs = ls + rs >> 1;
  mktree(noww, ls, nrs);
  mktree(noww | 1, nrs + 1, rs);
  gx(now, ls, rs);
}
void bjxc(int now, int ls, int rs) {
  if (!bj[now]) return;
  int noww = now << 1;
  vl[noww] += bj[now];
  vl[noww | 1] += bj[now];
  vr[noww] += bj[now];
  vr[noww | 1] += bj[now];
  bj[noww] += bj[now];
  bj[noww | 1] += bj[now];
  bj[now] = 0;
}
void jia(int now, int ls, int rs, int zuo, int you, long long val) {
  if (ls > you || rs < zuo) return;
  if (ls >= zuo && rs <= you) {
    vl[now] += val;
    vr[now] += val;
    bj[now] += val;
    return;
  }
  bjxc(now, ls, rs);
  int noww = now << 1, nrs = ls + rs >> 1;
  jia(noww, ls, nrs, zuo, you, val);
  jia(noww | 1, nrs + 1, rs, zuo, you, val);
  gx(now, ls, rs);
}
int main() {
  scanf("%d", &n);
  mktree(1, 1, n);
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d%I64d", &x, &y, &z);
    jia(1, 1, n, x, y, z);
    printf("%d\n", mx[1]);
  }
}
