#include <bits/stdc++.h>
using namespace std;
long long a[300010];
struct Node {
  Node *lch, *rch;
  long long add, lazy, lv, rv;
  int rhill, lhill, rdec, ldec, maxhill;
  Node() {
    lch = rch = nullptr;
    lv = rv = maxhill = rhill = lhill = rdec = ldec = add = lazy = 0;
  }
  inline void up(int l, int r) {
    int mid = (l + r) >> 1;
    lv = lch->lv;
    rv = rch->rv;
    maxhill = max(lch->maxhill, rch->maxhill);
    if (lch->rv < rch->lv) maxhill = max(maxhill, lch->rdec + rch->lhill);
    if (lch->rv > rch->lv) maxhill = max(maxhill, lch->rhill + rch->ldec);
    if (lch->rv != rch->lv) maxhill = max(maxhill, lch->rdec + rch->ldec);
    rhill = rch->rhill;
    if (rhill == r - mid && lch->rv < rch->lv) rhill += lch->rdec;
    if (rch->ldec == r - mid && lch->rv > rch->lv)
      rhill = max(rhill, lch->rhill + rch->ldec);
    if (rch->ldec == r - mid && lch->rv != rch->lv)
      rhill = max(rhill, lch->rdec + rch->ldec);
    lhill = lch->lhill;
    if (lhill == mid - l + 1 && lch->rv > rch->lv) lhill += rch->ldec;
    if (lch->rdec == mid - l + 1 && lch->rv < rch->lv)
      lhill = max(lhill, lch->rdec + rch->lhill);
    if (lch->rdec == mid - l + 1 && lch->rv != rch->lv)
      lhill = max(lhill, lch->rdec + rch->ldec);
    rdec = rch->rdec;
    if (rdec == r - mid && lch->rv < rch->lv) rdec += lch->rdec;
    ldec = lch->ldec;
    if (ldec == mid - l + 1 && lch->rv > rch->lv) ldec += rch->ldec;
  }
  inline void down() {
    if (lazy) {
      lch->add += lazy;
      lch->lazy += lazy;
      lch->lv += lazy;
      lch->rv += lazy;
      rch->add += lazy;
      rch->lazy += lazy;
      rch->lv += lazy;
      rch->rv += lazy;
      lazy = 0;
    }
  }
}* root = nullptr;
void init(int l, int r, Node*& node) {
  node = new Node();
  if (l == r) {
    node->rhill = node->lhill = node->rdec = node->ldec = node->maxhill = 1;
    node->lv = node->rv = a[l];
  } else {
    int mid = (l + r) >> 1;
    init(l, mid, node->lch);
    init(mid + 1, r, node->rch);
    node->up(l, r);
  }
}
void modify(int l, int r, int ql, int qr, int add, Node* node) {
  if (l == ql && r == qr) {
    node->add += add;
    node->lazy += add;
    node->lv += add;
    node->rv += add;
  } else {
    int mid = (l + r) >> 1;
    node->down();
    if (qr <= mid)
      modify(l, mid, ql, qr, add, node->lch);
    else if (ql > mid)
      modify(mid + 1, r, ql, qr, add, node->rch);
    else
      modify(l, mid, ql, mid, add, node->lch),
          modify(mid + 1, r, mid + 1, qr, add, node->rch);
    node->up(l, r);
  }
}
int main() {
  int n, m, l, r, d;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", a + i);
  scanf("%d", &m);
  init(1, n, root);
  for (int i = 0; i < m; i++) {
    scanf("%d%d%d", &l, &r, &d);
    modify(1, n, l, r, d, root);
    printf("%d\n", root->maxhill);
  }
  return 0;
}
