#include <bits/stdc++.h>
using namespace std;
const int N = 300005;
struct node {
  int l, r;
  int tot;
  int ls;
  int rs;
  long long lv, rv;
  int ld, rd;
  int lu, ru;
  long long tag;
  int size;
} tree[N * 4];
long long a[N];
void pushup(int p) {
  tree[p].lv = tree[p * 2].lv;
  tree[p].rv = tree[p * 2 + 1].rv;
  int lson = p * 2;
  int rson = p * 2 + 1;
  tree[p].ld = tree[lson].ld;
  tree[p].rd = tree[rson].rd;
  tree[p].lu = tree[lson].lu;
  tree[p].ru = tree[rson].ru;
  tree[p].ls = tree[lson].ls;
  tree[p].rs = tree[rson].rs;
  tree[p].tot = max(tree[lson].tot, tree[rson].tot);
  if (tree[lson].ld == tree[lson].size && tree[lson].rv > tree[rson].lv) {
    tree[p].ld = max(tree[p].ld, tree[lson].size + tree[rson].ld);
  }
  if (tree[rson].ru == tree[rson].size && tree[lson].rv < tree[rson].lv) {
    tree[p].ru = max(tree[p].ru, tree[rson].size + tree[lson].ru);
  }
  if (tree[lson].lu == tree[lson].size && tree[lson].rv < tree[rson].lv) {
    tree[p].lu = max(tree[p].lu, tree[lson].size + tree[rson].lu);
  }
  if (tree[rson].rd == tree[rson].size && tree[lson].rv > tree[rson].lv) {
    tree[p].rd = max(tree[p].rd, tree[rson].size + tree[lson].rd);
  }
  if (tree[lson].ls == tree[lson].size && tree[lson].rv > tree[rson].lv) {
    tree[p].ls = max(tree[p].ls, tree[lson].size + tree[rson].ld);
  }
  if (tree[lson].lu == tree[lson].size && tree[lson].rv > tree[rson].lv) {
    tree[p].ls = max(tree[p].ls, tree[lson].size + tree[rson].ld);
  }
  if (tree[lson].lu == tree[lson].size && tree[lson].rv < tree[rson].lv) {
    tree[p].ls = max(tree[p].ls, tree[lson].size + tree[rson].ls);
  }
  if (tree[rson].rs == tree[rson].size && tree[rson].lv > tree[lson].rv) {
    tree[p].rs = max(tree[p].rs, tree[rson].size + tree[lson].ru);
  }
  if (tree[rson].rd == tree[rson].size && tree[rson].lv > tree[lson].rv) {
    tree[p].rs = max(tree[p].rs, tree[rson].size + tree[lson].ru);
  }
  if (tree[rson].rd == tree[rson].size && tree[rson].lv < tree[lson].rv) {
    tree[p].rs = max(tree[p].rs, tree[rson].size + tree[lson].rs);
  }
  tree[p].tot = max(tree[p].tot, max(tree[p].rs, tree[p].ls));
  if (tree[lson].rv != tree[rson].lv)
    tree[p].tot = max(tree[p].tot, tree[lson].ru + tree[rson].ld);
  tree[p].tot = max(tree[p].tot, tree[p].ru);
  tree[p].tot = max(tree[p].tot, tree[p].lu);
  tree[p].tot = max(tree[p].tot, tree[p].rd);
  tree[p].tot = max(tree[p].tot, tree[p].ld);
  if (tree[lson].rv > tree[rson].lv)
    tree[p].tot =
        max(tree[p].tot, max(tree[lson].rd, tree[lson].rs) + tree[rson].ld);
  if (tree[rson].lv > tree[lson].rv)
    tree[p].tot =
        max(tree[p].tot, max(tree[rson].ls, tree[rson].lu) + tree[lson].ru);
}
void build(int p, int l, int r) {
  tree[p].l = l;
  tree[p].r = r;
  tree[p].size = (r - l + 1);
  tree[p].tag = 0;
  if (l == r) {
    tree[p].tot = tree[p].ld = tree[p].ls = tree[p].rd = tree[p].rs =
        tree[p].lu = tree[p].ru = 1;
    tree[p].lv = a[l];
    tree[p].rv = a[r];
    return;
  }
  int mid = (l + r) / 2;
  build(p * 2, l, mid);
  build(p * 2 + 1, mid + 1, r);
  pushup(p);
}
void pushdown(int p) {
  if (tree[p].tag == 0) return;
  tree[p * 2].lv += tree[p].tag;
  tree[p * 2].rv += tree[p].tag;
  tree[p * 2 + 1].lv += tree[p].tag;
  tree[p * 2 + 1].rv += tree[p].tag;
  tree[p * 2].tag += tree[p].tag;
  tree[p * 2 + 1].tag += tree[p].tag;
  tree[p].tag = 0;
}
void change(int p, int l, int r, long long x) {
  if (tree[p].l >= l && tree[p].r <= r) {
    tree[p].lv += x;
    tree[p].rv += x;
    tree[p].tag += x;
    return;
  }
  pushdown(p);
  int mid = (tree[p].l + tree[p].r) / 2;
  if (l <= mid) change(p * 2, l, r, x);
  if (r > mid) change(p * 2 + 1, l, r, x);
  pushup(p);
}
int main() {
  int n, m, i;
  int l, r;
  long long d;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%lld", &a[i]);
  build(1, 1, n);
  scanf("%d", &m);
  for (i = 1; i <= m; i++) {
    scanf("%d%d%lld", &l, &r, &d);
    change(1, l, r, d);
    printf("%d\n", tree[1].tot);
  }
  return 0;
}
