#include <bits/stdc++.h>
using namespace std;
struct Segment {
  int M, Len;
  int lv, mv, rv;
  bool pure() const { return mv == Len; }
  Segment() {}
  Segment(int M, int Len, int lv, int mv, int rv)
      : M(M), Len(Len), lv(lv), mv(mv), rv(rv) {}
};
inline int sign(long long x) { return x ? x > 0 ?: -1 : 0; }
long long a[524288];
int N;
Segment S[1048576];
void PushUp(int rt) {
  int ls = rt << 1, rs = ls | 1;
  int M = S[rt].M;
  S[rt].mv = max(S[ls].mv, S[rs].mv);
  if (!a[M] || !a[M + 1] || sign(a[M]) < sign(a[M + 1])) {
    S[rt].lv = S[ls].lv;
    S[rt].rv = S[rs].rv;
  } else {
    S[rt].lv = S[ls].pure() ? S[ls].lv + S[rs].lv : S[ls].lv;
    S[rt].rv = S[rs].pure() ? S[rs].rv + S[ls].rv : S[rs].rv;
    S[rt].mv = max(S[rt].mv, S[ls].rv + S[rs].lv);
  }
}
void Build(int n) {
  N = 1;
  while (N < n + 2) N <<= 1;
  for (int i = n + 1; i < N; ++i) a[i] = 0;
  for (int i = 0, j = N + i; i < N; ++i, ++j) {
    int x = !!sign(a[i]);
    S[j] = Segment(i, 1, x, x, x);
  }
  for (int i = N; --i;) {
    S[i].M = (S[i << 1].M + S[i << 1 | 1].M) >> 1;
    S[i].Len = S[i << 1].Len + S[i << 1 | 1].Len;
    PushUp(i);
  }
}
void Update(int L, int D) {
  a[L] += D;
  if (sign(a[L]) == sign(a[L] - D))
    return;
  else {
    int x = !!sign(a[L]), s = N + L;
    S[s] = Segment(L, 1, x, x, x);
    while (s >>= 1) PushUp(s);
  }
}
int main() {
  int n, m;
  while (~scanf("%d", &n)) {
    int pre, cur;
    scanf("%d", &pre);
    for (int i = 1; i < n; ++i) {
      scanf("%d", &cur);
      a[i] = cur - pre;
      pre = cur;
    }
    Build(n - 1);
    scanf("%d", &m);
    for (int i = 0; i < m; ++i) {
      static int l, r, d;
      scanf("%d%d%d", &l, &r, &d);
      if (l ^ 1) Update(l - 1, d);
      if (r ^ n) Update(r, -d);
      printf("%d\n", S[1].mv + 1);
    }
  }
  return 0;
}
