#include <bits/stdc++.h>
using namespace std;
const int maxn = (3e5 + 5) * 4;
int node[maxn], node1[maxn], node2[maxn], node3[maxn], node4[maxn], node5[maxn],
    node6[maxn];
long long nodel[maxn], noder[maxn], add[maxn];
void modify(int rt, long long c) {
  nodel[rt] += c;
  noder[rt] += c;
  add[rt] += c;
}
void pushup(int rt, int l, int r) {
  int m = (l + r) >> 1;
  node[rt] = max(node[rt << 1], node[rt << 1 | 1]);
  node1[rt] = node1[rt << 1];
  node2[rt] = node2[rt << 1 | 1];
  node3[rt] = node3[rt << 1];
  node4[rt] = node4[rt << 1 | 1];
  node5[rt] = node5[rt << 1];
  node6[rt] = node6[rt << 1 | 1];
  nodel[rt] = nodel[rt << 1];
  noder[rt] = noder[rt << 1 | 1];
  if (noder[rt << 1] < nodel[rt << 1 | 1]) {
    node[rt] = max(node[rt], node2[rt << 1] + node5[rt << 1 | 1]);
    if (node1[rt << 1] == m - l + 1) {
      node1[rt] = node1[rt << 1] + node1[rt << 1 | 1];
      node5[rt] = node1[rt << 1] + node5[rt << 1 | 1];
    }
    if (node2[rt << 1 | 1] == r - m)
      node2[rt] = node2[rt << 1] + node2[rt << 1 | 1];
    if (node6[rt << 1 | 1] == r - m)
      node6[rt] = node2[rt << 1] + node6[rt << 1 | 1];
  } else if (noder[rt << 1] > nodel[rt << 1 | 1]) {
    node[rt] = max(node[rt], node6[rt << 1] + node3[rt << 1 | 1]);
    if (node3[rt << 1] == m - l + 1)
      node3[rt] = node3[rt << 1] + node3[rt << 1 | 1];
    if (node4[rt << 1 | 1] == r - m) {
      node4[rt] = node4[rt << 1] + node4[rt << 1 | 1];
      node6[rt] = node6[rt << 1] + node4[rt << 1 | 1];
    }
    if (node5[rt << 1] == m - l + 1)
      node5[rt] = node5[rt << 1] + node3[rt << 1 | 1];
  }
}
void pushdown(int rt) {
  if (add[rt]) {
    modify(rt << 1, add[rt]);
    modify(rt << 1 | 1, add[rt]);
    add[rt] = 0;
  }
}
void build(int rt, int l, int r) {
  add[rt] = 0;
  if (l == r) {
    scanf("%I64d", nodel + rt);
    noder[rt] = nodel[rt];
    node[rt] = node1[rt] = node2[rt] = node3[rt] = node4[rt] = node5[rt] =
        node6[rt] = 1;
    return;
  }
  int m = (l + r) >> 1;
  build(rt << 1, l, m);
  build(rt << 1 | 1, m + 1, r);
  pushup(rt, l, r);
}
void update(int rt, int l, int r, int x, int y, int c) {
  if (x <= l && r <= y) {
    modify(rt, c);
    return;
  }
  pushdown(rt);
  int m = (l + r) >> 1;
  if (x <= m) update(rt << 1, l, m, x, y, c);
  if (m < y) update(rt << 1 | 1, m + 1, r, x, y, c);
  pushup(rt, l, r);
}
int main() {
  int n;
  scanf("%d", &n);
  build(1, 1, n);
  int q;
  scanf("%d", &q);
  while (q--) {
    int l, r, c;
    scanf("%d%d%d", &l, &r, &c);
    update(1, 1, n, l, r, c);
    printf("%d\n", node[1]);
  }
  return 0;
}
