#include <bits/stdc++.h>
using namespace std;
struct Hill {
  int Lid, Mid, Rid;
  long long Lv, Mv, Rv;
  bool valid;
  Hill() : valid(false) {}
  Hill(int Lid, int Mid, int Rid, long long Lv, long long Mv, long long Rv)
      : Lid(Lid), Mid(Mid), Rid(Rid), Lv(Lv), Mv(Mv), Rv(Rv), valid(true) {}
  int Len() const { return valid ? Rid - Lid + 1 : 0; }
  Hill operator+(const Hill B) const {
    Hill Ans;
    if (Rv == B.Lv) return Ans;
    if (Rv < B.Lv) {
      if (Mid == Rid)
        return Hill(Lid, B.Mid, B.Rid, Lv, B.Mv, B.Rv);
      else
        return Hill(Rid, B.Mid, B.Rid, Rv, B.Mv, B.Rv);
    } else {
      if (B.Mid == B.Lid)
        return Hill(Lid, Mid, B.Rid, Lv, Mv, B.Rv);
      else
        return Hill(Lid, Mid, B.Lid, Lv, Mv, B.Lv);
    }
  }
  bool operator<(const Hill B) const { return Len() < B.Len(); }
  void show() {
    if (valid)
      printf("A[%d]=%d  A[%d]=%d  A[%d]=%d\n", Lid, int(Lv), Mid, int(Mv), Rid,
             int(Rv));
    else
      printf("ERROR!\n");
  }
};
Hill CLeft(const Hill A, const Hill B) {
  if (!B.valid || B.Lv == A.Rv) return A;
  if (A.Mid == A.Rid) {
    if (B.Lv > A.Rv)
      return Hill(A.Lid, B.Mid, B.Rid, A.Lv, B.Mv, B.Rv);
    else if (B.Lid == B.Mid)
      return Hill(A.Lid, A.Mid, B.Rid, A.Lv, A.Mv, B.Rv);
    else
      return Hill(A.Lid, A.Mid, B.Lid, A.Lv, A.Mv, B.Lv);
  } else {
    if (B.Lv < A.Rv) {
      if (B.Lid == B.Mid)
        return Hill(A.Lid, A.Mid, B.Rid, A.Lv, A.Mv, B.Rv);
      else
        return Hill(A.Lid, A.Mid, B.Lid, A.Lv, A.Mv, B.Lv);
    } else
      return A;
  }
}
Hill CRight(const Hill A, const Hill B) {
  if (!A.valid || A.Rv == B.Lv) return B;
  if (B.Mid == B.Lid) {
    if (A.Rv > B.Lv)
      return Hill(A.Lid, A.Mid, B.Rid, A.Lv, A.Mv, B.Rv);
    else if (A.Rid == A.Mid)
      return Hill(A.Lid, B.Mid, B.Rid, A.Lv, B.Mv, B.Rv);
    else
      return Hill(A.Rid, B.Mid, B.Rid, A.Rv, B.Mv, B.Rv);
  } else {
    if (A.Rv < B.Lv) {
      if (A.Rid == A.Mid)
        return Hill(A.Lid, B.Mid, B.Rid, A.Lv, B.Mv, B.Rv);
      else
        return Hill(A.Rid, B.Mid, B.Rid, A.Rv, B.Mv, B.Rv);
    } else
      return B;
  }
}
struct Segment {
  Hill L, M, R;
  bool pure;
  Segment() {}
  Segment(Hill L, Hill M, Hill R, bool pure) : L(L), M(M), R(R), pure(pure) {}
  Segment operator+(const Segment B) const {
    Segment Ans;
    Ans.L = pure ? CLeft(L, B.L) : L;
    Ans.R = B.pure ? CRight(R, B.R) : B.R;
    Hill CM = M < B.M ? B.M : M;
    Ans.M = R + B.L;
    if (Ans.M < CM) Ans.M = CM;
    Ans.pure = Ans.M.Len() == Ans.R.Rid - Ans.L.Lid + 1;
    return Ans;
  }
  void Add(const long long D) {
    L.Lv += D;
    L.Mv += D;
    L.Rv += D;
    M.Lv += D;
    M.Mv += D;
    M.Rv += D;
    R.Lv += D;
    R.Mv += D;
    R.Rv += D;
  }
  void show() {
    L.show();
    M.show();
    R.show();
  }
};
Segment S[300001 << 2];
long long Add[300001 << 2];
int mm[300001 << 2];
void PushUp(int rt) { S[rt] = S[rt << 1] + S[rt << 1 | 1]; }
void PushDown(int rt) {
  int ls = rt << 1, rs = ls | 1;
  if (Add[rt]) {
    Add[ls] += Add[rt];
    Add[rs] += Add[rt];
    S[ls].Add(Add[rt]);
    S[rs].Add(Add[rt]);
    Add[rt] = 0;
  }
}
void Build(int l, int r, int rt) {
  if (l == r) {
    int v;
    scanf("%d", &v);
    Hill tempH(l, l, l, v, v, v);
    S[rt] = Segment(tempH, tempH, tempH, true);
    return;
  }
  int m = mm[rt] = (l + r) >> 1;
  Build(l, m, rt << 1);
  Build(m + 1, r, rt << 1 | 1);
  PushUp(rt);
  Add[rt] = 0;
}
void Update(const int L, const int R, const long long D, const int l,
            const int r, const int rt) {
  if (L <= l && r <= R) {
    Add[rt] += D;
    S[rt].Add(D);
    return;
  }
  const int m = mm[rt];
  PushDown(rt);
  if (L <= m) Update(L, R, D, l, m, rt << 1);
  if (R > m) Update(L, R, D, m + 1, r, rt << 1 | 1);
  PushUp(rt);
}
void Search(int l, int r, int rt) {
  if (l == r) {
    printf("%d ", int(S[rt].L.Lv));
    return;
  }
  PushDown(rt);
  int m = (l + r) >> 1;
  Search(l, m, rt << 1);
  Search(m + 1, r, rt << 1 | 1);
}
int main() {
  int n, m;
  while (~scanf("%d", &n)) {
    Build(1, n, 1);
    scanf("%d", &m);
    for (int i = 0; i < m; ++i) {
      static int l, r, d;
      scanf("%d%d%d", &l, &r, &d);
      Update(l, r, d, 1, n, 1);
      printf("%d\n", S[1].M.Len());
    }
  }
  return 0;
}
