#include <bits/stdc++.h>
using namespace std;
const double eps = 1E-8;
const int dx4[4] = {1, 0, 0, -1};
const int dy4[4] = {0, -1, 1, 0};
const int inf = 0x3f3f3f3f;
const int N = 3E5 + 11;
int a[N];
int n, m;
struct Tree {
 public:
  long long lm, rm;
  int ans, len, upL, upR, downL, downR, maxL, maxR;
  Tree() { ans = len = upL = upR = downL = downR = maxL = maxR = lm = rm = 0; }
  Tree(int x) {
    ans = len = upL = upR = downL = downR = maxL = maxR = 1;
    lm = rm = x;
  }
};
Tree operator+(Tree x, Tree y) {
  Tree res;
  if (x.rm > y.lm) {
    res.ans = max(x.ans, y.ans);
    res.len = x.len + y.len;
    res.upL = x.upL;
    res.upR = y.upR;
    res.downL = x.downL + (x.downL == x.len) * (y.downL);
    res.downR = y.downR + (y.downR == y.len) * (x.downR);
    res.lm = x.lm;
    res.rm = y.rm;
    res.ans = max(res.ans, x.maxR + y.downL);
    res.maxL = x.maxL + (x.maxL == x.len) * (y.downL);
    res.maxR = y.maxR + (y.downL == y.len) * (x.maxR);
  } else if (x.rm < y.lm) {
    res.ans = max(x.ans, y.ans);
    res.len = x.len + y.len;
    res.upL = x.upL + (x.upL == x.len) * (y.upL);
    res.upR = y.upR + (y.upR == y.len) * (x.upR);
    res.downL = x.downL;
    res.downR = y.downR;
    res.lm = x.lm;
    res.rm = y.rm;
    res.ans = max(res.ans, x.upR + y.maxL);
    res.maxL = x.maxL + (x.upL == x.len) * (y.maxL);
    res.maxR = y.maxR + (y.maxR == y.len) * (x.upR);
  } else {
    res.ans = max(x.ans, y.ans);
    res.len = x.len + y.len;
    res.upL = x.upL;
    res.upR = y.upR;
    res.downL = x.downL;
    res.downR = y.downR;
    res.lm = x.lm;
    res.rm = y.rm;
    res.maxL = x.maxL;
    res.maxR = y.maxR;
  }
  return res;
}
Tree tree[N << 2];
long long lazy[N << 2];
void doit(int rt, long long v) {
  lazy[rt] += v;
  tree[rt].lm += v;
  tree[rt].rm += v;
}
void PushDown(int rt) {
  if (lazy[rt]) {
    doit(rt << 1, lazy[rt]);
    doit(rt << 1 | 1, lazy[rt]);
    lazy[rt] = 0;
  }
}
void build(int l, int r, int rt) {
  if (l == r) {
    tree[rt] = Tree(a[l]);
    return;
  }
  int m = (l + r) >> 1;
  build(l, m, rt << 1);
  build(m + 1, r, rt << 1 | 1);
  tree[rt] = tree[rt << 1] + tree[rt << 1 | 1];
}
void update(int L, int R, int d, int l, int r, int rt) {
  if (L <= l && r <= R) {
    doit(rt, d);
    return;
  }
  PushDown(rt);
  int m = (l + r) >> 1;
  if (L <= m) update(L, R, d, l, m, rt << 1);
  if (R >= m + 1) update(L, R, d, m + 1, r, rt << 1 | 1);
  tree[rt] = tree[rt << 1] + tree[rt << 1 | 1];
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  cin >> m;
  build(1, n, 1);
  while (m--) {
    int l, r, d;
    scanf("%d%d%d", &l, &r, &d);
    update(l, r, d, 1, n, 1);
    printf("%d\n", tree[1].ans);
  }
  return 0;
}
