#include <bits/stdc++.h>
using namespace std;
inline int readInt() {
  static int n, ch;
  n = 0, ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) n = n * 10 + ch - '0', ch = getchar();
  return n;
}
const int MAX_N = 300000 + 3;
int n, m, a[MAX_N];
namespace segment_tree {
const int MAX_NODE = (1 << 19) * 2;
inline void relax(int &a, const int &b) {
  if (b > a) a = b;
}
struct node {
  long long lVal, rVal;
  int l, r;
  int maxHill, maxLeftHill, maxRightHill;
  bool descend, ascend;
  int maxLeftDescend, maxRightAscend;
} datas[MAX_NODE];
inline node merge(const node &lhs, const node &rhs) {
  node res;
  res.lVal = lhs.lVal, res.rVal = rhs.rVal, res.l = lhs.l, res.r = rhs.r;
  res.maxHill = max(lhs.maxHill, rhs.maxHill);
  if (lhs.rVal < rhs.lVal)
    relax(res.maxHill, lhs.maxRightAscend + rhs.maxLeftHill);
  else if (lhs.rVal > rhs.lVal)
    relax(res.maxHill, lhs.maxRightHill + rhs.maxLeftDescend);
  res.maxLeftHill = lhs.maxLeftHill;
  if (lhs.r - lhs.l == lhs.maxLeftHill) {
    if (lhs.ascend) {
      if (lhs.rVal < rhs.lVal)
        relax(res.maxLeftHill, lhs.maxLeftHill + rhs.maxLeftHill);
      else if (lhs.rVal > rhs.lVal)
        relax(res.maxLeftHill, lhs.maxLeftHill + rhs.maxLeftDescend);
    } else {
      if (lhs.rVal > rhs.lVal)
        relax(res.maxLeftHill, lhs.maxLeftHill + rhs.maxLeftDescend);
    }
  }
  res.maxRightHill = rhs.maxRightHill;
  if (rhs.r - rhs.l == rhs.maxRightHill) {
    if (rhs.descend) {
      if (rhs.lVal < lhs.rVal)
        relax(res.maxRightHill, rhs.maxRightHill + lhs.maxRightHill);
      else if (rhs.lVal > lhs.rVal)
        relax(res.maxRightHill, lhs.maxRightAscend + rhs.maxRightHill);
    } else {
      if (rhs.lVal > lhs.rVal)
        relax(res.maxRightHill, lhs.maxRightAscend + rhs.maxRightHill);
    }
  }
  res.descend = false;
  if (lhs.descend && rhs.descend && lhs.rVal > rhs.lVal) res.descend = true;
  res.ascend = false;
  if (lhs.ascend && rhs.ascend && lhs.rVal < rhs.lVal) res.ascend = true;
  res.maxLeftDescend = lhs.maxLeftDescend;
  if (lhs.descend && lhs.rVal > rhs.lVal)
    relax(res.maxLeftDescend, lhs.maxLeftDescend + rhs.maxLeftDescend);
  res.maxRightAscend = rhs.maxRightAscend;
  if (rhs.ascend && rhs.lVal > lhs.rVal)
    relax(res.maxRightAscend, lhs.maxRightAscend + rhs.maxRightAscend);
  return res;
}
long long addV[MAX_NODE];
inline void build(int o, int l, int r) {
  if (r - l == 1) {
    datas[o].lVal = datas[o].rVal = a[l];
    datas[o].l = l, datas[o].r = r;
    datas[o].maxHill = datas[o].maxLeftHill = datas[o].maxRightHill = 1;
    datas[o].ascend = datas[o].descend = true;
    datas[o].maxLeftDescend = datas[o].maxRightAscend = 1;
  } else {
    build((((o) << 1) + 1), l, (((l) + (r)) >> 1)),
        build((((o) << 1) + 2), (((l) + (r)) >> 1), r);
    datas[o] = merge(datas[(((o) << 1) + 1)], datas[(((o) << 1) + 2)]);
  }
}
inline void giveTag(int o, long long v) {
  addV[o] += v;
  datas[o].lVal += v, datas[o].rVal += v;
}
inline void pushDown(int o) {
  if (addV[o]) {
    giveTag((((o) << 1) + 1), addV[o]);
    giveTag((((o) << 1) + 2), addV[o]);
    addV[o] = 0;
  }
}
inline void modify(int o, int l, int r, int a, int b, int d) {
  if (l >= a && r <= b)
    giveTag(o, d);
  else {
    pushDown(o);
    if ((((l) + (r)) >> 1) > a)
      modify((((o) << 1) + 1), l, (((l) + (r)) >> 1), a, b, d);
    if ((((l) + (r)) >> 1) < b)
      modify((((o) << 1) + 2), (((l) + (r)) >> 1), r, a, b, d);
    datas[o] = merge(datas[(((o) << 1) + 1)], datas[(((o) << 1) + 2)]);
  }
}
inline void print(int o, int l, int r) {
  if (r - l == 1)
    printf("%d\n", datas[o].lVal);
  else {
    pushDown(o);
    print((((o) << 1) + 1), l, (((l) + (r)) >> 1)),
        print((((o) << 1) + 2), (((l) + (r)) >> 1), r);
    datas[o] = merge(datas[(((o) << 1) + 1)], datas[(((o) << 1) + 2)]);
  }
}
}  // namespace segment_tree
using namespace segment_tree;
int main() {
  n = readInt();
  for (int i = 0; i < n; ++i) a[i] = readInt();
  build(0, 0, n);
  m = readInt();
  for (int i = 0, l, r, v; i < m; ++i) {
    l = readInt() - 1, r = readInt(), v = readInt();
    modify(0, 0, n, l, r, v);
    printf("%d\n", datas[0].maxHill);
  }
  return 0;
}
