#include <bits/stdc++.h>
using namespace std;
struct data {
  int ldown, rdown;
  long long l, r;
  int lhiint, rhiint;
  int best, siz;
};
data merge(data a, data b) {
  data ret;
  ret.best = max(a.best, b.best);
  ret.l = a.l, ret.r = b.r;
  ret.siz = a.siz + b.siz;
  ret.ldown = a.ldown, ret.rdown = b.rdown;
  ret.lhiint = a.lhiint, ret.rhiint = b.rhiint;
  if (a.r > b.l) ret.best = max(ret.best, a.rhiint + b.ldown);
  if (a.r < b.l) ret.best = max(ret.best, a.rdown + b.lhiint);
  if (ret.ldown == a.siz && a.r > b.l) ret.ldown += b.ldown;
  if (ret.rdown == b.siz && a.r < b.l) ret.rdown += a.rdown;
  ret.best = max(ret.best, ret.ldown);
  ret.best = max(ret.best, ret.rdown);
  if (ret.lhiint == a.siz && a.r > b.l) ret.lhiint += b.ldown;
  if (ret.rhiint == b.siz && a.r < b.l) ret.rhiint += a.rdown;
  if (a.rdown == a.siz && a.r < b.l)
    ret.lhiint = max(ret.lhiint, a.siz + b.lhiint);
  if (b.ldown == b.siz && a.r > b.l)
    ret.rhiint = max(ret.rhiint, b.siz + a.rhiint);
  ret.best = max(ret.best, ret.lhiint);
  ret.best = max(ret.best, ret.rhiint);
  return ret;
}
int n;
long long p[300007 * 4], a[300007];
data t[300007 * 4];
void print(int node) {
  cout << "------ " << node << " -------\n";
  cout << t[node].l << ' ' << t[node].r << endl;
  cout << t[node].best << endl;
  cout << t[node].ldown << ' ' << t[node].rdown << endl;
  cout << t[node].lhiint << ' ' << t[node].rhiint << endl;
}
void build(int b, int e, int node) {
  if (b == e) {
    t[node].ldown = 1;
    t[node].rdown = 1;
    t[node].l = a[b];
    t[node].r = a[b];
    t[node].lhiint = 1;
    t[node].rhiint = 1;
    t[node].best = 1;
    t[node].siz = 1;
    return;
  }
  int mid = (b + e) / 2;
  int l = 2 * node, h = l + 1;
  build(b, mid, l);
  build(mid + 1, e, h);
  t[node] = merge(t[l], t[h]);
}
void propagate(int node) {
  int l = 2 * node, h = l + 1;
  t[l].l += p[node], t[l].r += p[node];
  t[h].l += p[node];
  t[h].r += p[node];
  p[l] += p[node];
  p[h] += p[node];
  p[node] = 0;
}
void update(int b, int e, int node, int x, int y, long long val) {
  if (y < b || e < x) return;
  if (b >= x && e <= y) {
    t[node].l += val;
    t[node].r += val;
    p[node] += val;
    return;
  }
  propagate(node);
  int mid = (b + e) / 2, l = 2 * node, h = l + 1;
  update(b, mid, l, x, y, val);
  update(mid + 1, e, h, x, y, val);
  t[node] = merge(t[l], t[h]);
}
int main() {
  int m, x, y, c;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  scanf("%d", &m);
  build(1, n, 1);
  while (m--) {
    scanf("%d %d %d", &x, &y, &c);
    update(1, n, 1, x, y, c);
    printf("%d\n", t[1].best);
  }
  return 0;
}
