#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int A[500005];
typedef struct nodo {
  int lon;
  int maxsolo;
  int maxder;
  long long altder;
  int escolder;
  int maxizq;
  long long altizq;
  int escolizq;
  nodo() {}
  nodo(int x) {
    lon = 1;
    maxsolo = 1;
    maxder = 1;
    altder = x;
    escolder = 1;
    maxizq = 1;
    altizq = x;
    escolizq = 1;
  }
} nodo;
nodo operar(nodo &A, nodo &B) {
  nodo C;
  C.lon = A.lon + B.lon;
  C.altizq = A.altizq;
  C.altder = B.altder;
  C.maxder = max(B.maxder + ((A.altder < B.altizq && B.lon == B.maxder)
                                 ? (A.escolder ? A.maxder : 1)
                                 : 0),
                 (B.altizq < A.altder && B.lon == B.maxizq && B.escolizq)
                     ? A.maxder + B.lon
                     : 0);
  C.maxizq = max(A.maxizq + ((B.altizq < A.altder && A.lon == A.maxizq)
                                 ? (B.escolizq ? B.maxizq : 1)
                                 : 0),
                 (B.altizq > A.altder && A.lon == A.maxder && A.escolder)
                     ? B.maxizq + A.lon
                     : 0);
  int opmed1 =
      B.maxizq + (B.altizq > A.altder ? (A.escolder ? A.maxder : 1) : 0);
  int opmed2 =
      A.maxder + (B.altizq < A.altder ? (B.escolizq ? B.maxizq : 1) : 0);
  C.escolder = (B.lon == 1 ? (B.altizq > A.altder) : B.escolder);
  C.escolizq = (A.lon == 1 ? (A.altder > B.altizq) : A.escolizq);
  C.maxsolo = max(max(C.maxder, C.maxizq),
                  max(max(A.maxsolo, B.maxsolo), max(opmed1, opmed2)));
  return C;
}
nodo NULO;
class SegmentTree {
 private:
  vector<nodo> st;
  vector<long long> lazy;
  int n;
  inline int left(int p) { return (p << 1); }
  inline int right(int p) { return (p << 1) + 1; }
  void build(int p, int L, int R) {
    if (L == R) {
      st[p] = nodo(A[L]);
    } else {
      build(left(p), L, (L + R) / 2);
      build(right(p), (L + R) / 2 + 1, R);
      st[p] = operar(st[left(p)], st[right(p)]);
    }
  }
  void push_lazy(int p, int L, int R) {
    long long value = lazy[p];
    if (L != R) {
      lazy[left(p)] += value;
      lazy[right(p)] += value;
    }
    st[p].altder += value;
    st[p].altizq += value;
    lazy[p] = 0;
  }
  nodo rmq(int p, int L, int R, int i, int j) {
    if (lazy[p]) push_lazy(p, L, R);
    if (i > R || j < L) return NULO;
    if (L >= i && R <= j) return st[p];
    nodo p1 = rmq(left(p), L, (L + R) / 2, i, j);
    nodo p2 = rmq(right(p), (L + R) / 2 + 1, R, i, j);
    if (p1.lon == 0) return p2;
    if (p2.lon == 0) return p1;
    return operar(p1, p2);
  }
  void update(int p, int L, int R, int i, int j, long long v) {
    if (lazy[p]) push_lazy(p, L, R);
    if (j < L || i > R) return;
    if (L >= i && R <= j) {
      lazy[p] += v;
      push_lazy(p, L, R);
      return;
    }
    update(left(p), L, (L + R) / 2, i, j, v);
    update(right(p), (L + R) / 2 + 1, R, i, j, v);
    st[p] = operar(st[left(p)], st[right(p)]);
  }

 public:
  SegmentTree() {}
  void crear(int lon) {
    n = lon;
    st.assign(8 * n, 0);
    lazy.assign(8 * n, 0);
    build(1, 0, n - 1);
  }
  nodo rmq(int i, int j) { return rmq(1, 0, n - 1, i, j); }
  void update(int i, int j, long long v) { update(1, 0, n - 1, i, j, v); }
};
SegmentTree ST;
int main() {
  int n, m, l, r, d;
  cin >> n;
  for (int i = (0); i < (n); i++) {
    scanf("%d", &A[i]);
  }
  NULO.lon = 0;
  ST.crear(n);
  cin >> m;
  for (int i = (0); i < (m); i++) {
    scanf("%d %d %d", &l, &r, &d);
    ST.update(l - 1, r - 1, d);
    printf("%d\n", ST.rmq(0, n - 1).maxsolo);
  }
  return 0;
}
