#include <bits/stdc++.h>
using namespace std;
int n;
int a[1 << 19];
int m;
class node {
 public:
  unsigned int best;
  long long l, r;
  unsigned int len;
  unsigned int lbest, rbest;
  unsigned int ld, rd;
} dummy;
void merge(const node &first, const node &second, node &r) {
  if (second.best == 0) {
    r = first;
    return;
  }
  if (first.best == 0) {
    r = second;
    return;
  }
  r.best = first.best < second.best ? second.best : first.best;
  r.l = first.l;
  r.r = second.r;
  r.len = first.len + second.len;
  r.lbest = first.lbest;
  r.rbest = second.rbest;
  r.ld = first.ld;
  r.rd = second.rd;
  if (first.r < second.l) {
    if (second.rd == second.len) r.rd = second.len + first.rd;
    if (second.rbest == second.len) r.rbest = second.len + first.rd;
    if (first.rd == first.len && second.lbest + first.len > r.lbest)
      r.lbest = second.lbest + first.len;
    if (first.rd + second.lbest > r.best) r.best = first.rd + second.lbest;
  }
  if (first.r > second.l) {
    if (first.ld == first.len) r.ld = first.len + second.ld;
    if (first.lbest == first.len) r.lbest = first.len + second.ld;
    if (second.ld == second.len && first.rbest + second.len > r.rbest)
      r.rbest = first.rbest + second.len;
    if (first.rbest + second.ld > r.best) r.best = first.rbest + second.ld;
  }
}
const int offset = 1 << 19;
node T[offset * 2];
long long P[offset * 2];
void prop(int id) {
  if (!P[id]) return;
  long long val = P[id];
  P[id] = 0;
  P[id * 2] += val;
  P[id * 2 + 1] += val;
  T[id * 2].l += val;
  T[id * 2].r += val;
  T[id * 2 + 1].l += val;
  T[id * 2 + 1].r += val;
}
void add(int id, int lo, int hi, int slo, int shi, long long val) {
  if (lo > shi || hi < slo) return;
  if (lo >= slo && hi <= shi) {
    P[id] += val;
    T[id].l += val;
    T[id].r += val;
    return;
  }
  int mid = (lo + hi) / 2;
  prop(id);
  add(id * 2, lo, mid, slo, shi, val);
  add(id * 2 + 1, mid + 1, hi, slo, shi, val);
  merge(T[id * 2], T[id * 2 + 1], T[id]);
}
void init(int id, int lo, int hi) {
  if (lo == hi) {
    if (lo >= n) {
      T[id].best = 0;
      return;
    }
    T[id].best = 1;
    T[id].len = 1;
    T[id].l = T[id].r = a[lo];
    T[id].lbest = T[id].rbest = T[id].ld = T[id].rd = 1;
    return;
  }
  int mid = (lo + hi) / 2;
  init(id * 2, lo, mid);
  init(id * 2 + 1, mid + 1, hi);
  merge(T[id * 2], T[id * 2 + 1], T[id]);
}
int main() {
  ios_base::sync_with_stdio(false);
  dummy.best = 0;
  cin >> n;
  for (int i = (int)(0); i < (int)(n); ++i) cin >> a[i];
  init(1, 0, offset - 1);
  cin >> m;
  for (int ttt = (int)(0); ttt < (int)(m); ++ttt) {
    int l, r, d;
    cin >> l >> r >> d;
    --l, --r;
    add(1, 0, offset - 1, l, r, d);
    cout << T[1].best << endl;
  }
  return 0;
}
