#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300300;
struct Node {
  int l, r, l_line, r_line, maxn;
  long long lv, rv;
} node[MAXN << 2];
int a[MAXN];
void push_up(int rt) {
  int lson = rt << 1, rson = rt << 1 | 1;
  node[rt].maxn = node[lson].maxn;
  node[rt].maxn = max(node[rt].maxn, node[rson].maxn);
  if (!(node[lson].rv <= 0 && node[rson].lv >= 0))
    node[rt].maxn = max(node[lson].r_line + node[rson].l_line, node[rt].maxn);
  node[rt].lv = node[lson].lv;
  node[rt].rv = node[rson].rv;
  node[rt].l_line = node[lson].l_line;
  if (node[lson].l_line == node[lson].r - node[lson].l + 1 &&
      !(node[lson].rv <= 0 && node[rson].lv >= 0))
    node[rt].l_line += node[rson].l_line;
  node[rt].r_line = node[rson].r_line;
  if (node[rson].r_line == node[rson].r - node[rson].l + 1 &&
      !(node[lson].rv <= 0 && node[rson].lv >= 0))
    node[rt].r_line += node[lson].r_line;
}
void build(int l, int r, int rt) {
  node[rt].l = l;
  node[rt].r = r;
  if (l == r) {
    node[rt].lv = a[r] - a[r - 1];
    node[rt].rv = a[r] - a[r - 1];
    if (a[r] - a[r - 1])
      node[rt].r_line = node[rt].l_line = node[rt].maxn = 1;
    else
      node[rt].r_line = node[rt].l_line = node[rt].maxn = 0;
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, rt << 1);
  build(mid + 1, r, rt << 1 | 1);
  push_up(rt);
}
void update(int rt, int idx, int d) {
  if (node[rt].l == node[rt].r) {
    node[rt].lv += d;
    node[rt].rv += d;
    if (node[rt].lv)
      node[rt].r_line = node[rt].l_line = node[rt].maxn = 1;
    else
      node[rt].r_line = node[rt].l_line = node[rt].maxn = 0;
    return;
  }
  int mid = (node[rt].l + node[rt].r) >> 1;
  if (idx <= mid)
    update(rt << 1, idx, d);
  else
    update(rt << 1 | 1, idx, d);
  push_up(rt);
}
int main() {
  int n, m, l, r, d;
  cin >> n;
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  if (n > 1) build(1, n - 1, 1);
  scanf("%d", &m);
  while (m--) {
    scanf("%d %d %d", &l, &r, &d);
    if (n == 1) {
      cout << 1 << endl;
      continue;
    }
    if (l != 1) update(1, l - 1, d);
    if (r != n) update(1, r, -d);
    printf("%d\n", node[1].maxn + 1);
  }
}
