#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 100;
int mx1l[N << 2], mx1r[N << 2], mx2l[N << 2], mx2r[N << 2], mx2[N << 2];
long long vl[N << 2], vr[N << 2], tag[N << 2];
int a[N], sz[N << 2];
void pushdown(int rt) {
  if (tag[rt]) {
    vl[rt << 1] += tag[rt];
    vl[rt << 1 | 1] += tag[rt];
    vr[rt << 1] += tag[rt];
    vr[rt << 1 | 1] += tag[rt];
    tag[rt << 1] += tag[rt];
    tag[rt << 1 | 1] += tag[rt];
    tag[rt] = 0;
  }
}
void pushup(int rt) {
  vl[rt] = vl[rt << 1];
  vr[rt] = vr[rt << 1 | 1];
  int v2 = 0;
  mx2[rt] = max(mx2[rt << 1], mx2[rt << 1 | 1]);
  mx1l[rt] = mx1l[rt << 1];
  if (mx1l[rt << 1] == sz[rt << 1] && vr[rt << 1] > vl[rt << 1 | 1]) {
    mx1l[rt] += mx1l[rt << 1 | 1];
  }
  mx2[rt] = max(mx2[rt], mx1l[rt]);
  mx1r[rt] = mx1r[rt << 1 | 1];
  if (mx1r[rt << 1 | 1] == sz[rt << 1 | 1] && vr[rt << 1] < vl[rt << 1 | 1]) {
    mx1r[rt] += mx1r[rt << 1];
  }
  mx2[rt] = max(mx2[rt], mx1r[rt]);
  mx2l[rt] = mx2l[rt << 1];
  if (mx2l[rt << 1] == sz[rt << 1] && vr[rt << 1] > vl[rt << 1 | 1]) {
    mx2l[rt] += mx1l[rt << 1 | 1];
  }
  mx2[rt] = max(mx2[rt], mx2l[rt]);
  if (mx1r[rt << 1] == sz[rt << 1] && vr[rt << 1] < vl[rt << 1 | 1]) {
    mx2l[rt] = max(mx2l[rt], mx1r[rt << 1] + mx2l[rt << 1 | 1]);
  }
  mx2r[rt] = mx2r[rt << 1 | 1];
  if (mx2r[rt << 1 | 1] == sz[rt << 1 | 1] && vl[rt << 1 | 1] > vr[rt << 1])
    mx2r[rt] += mx1r[rt << 1];
  mx2[rt] = max(mx2[rt], mx2r[rt]);
  if (mx1l[rt << 1 | 1] == sz[rt << 1 | 1] && vr[rt << 1] > vl[rt << 1 | 1])
    v2 = mx1l[rt << 1 | 1] + mx2r[rt << 1];
  mx2r[rt] = max(mx2r[rt], v2);
  mx2[rt] = max(mx2[rt], max(mx2l[rt], mx2r[rt]));
  if (vl[rt << 1 | 1] > vr[rt << 1])
    mx2[rt] = max(mx2[rt], mx1r[rt << 1] + mx2l[rt << 1 | 1]);
  if (vl[rt << 1 | 1] < vr[rt << 1])
    mx2[rt] = max(mx2[rt], mx2r[rt << 1] + mx1l[rt << 1 | 1]);
}
void update(int L, int R, int l, int r, int rt, long long x) {
  if (L <= l && R >= r) {
    vl[rt] += x;
    vr[rt] += x;
    tag[rt] += x;
    return;
  }
  pushdown(rt);
  int mid = (l + r) >> 1;
  if (L <= mid) update(L, R, l, mid, rt << 1, x);
  if (R > mid) update(L, R, mid + 1, r, rt << 1 | 1, x);
  pushup(rt);
}
void build(int l, int r, int rt) {
  sz[rt] = r - l + 1;
  if (l == r) {
    vl[rt] = vr[rt] = a[l];
    mx1l[rt] = mx1r[rt] = mx2l[rt] = mx2r[rt] = mx2[rt] = 1;
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, rt << 1);
  build(mid + 1, r, rt << 1 | 1);
  pushup(rt);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  build(1, n, 1);
  int q;
  scanf("%d", &q);
  while (q--) {
    int a, b;
    long long d;
    scanf("%d%d%I64d", &a, &b, &d);
    update(a, b, 1, n, 1, d);
    printf("%d\n", mx2[1]);
  }
}
