#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void smax(T &first, T second) {
  first = max((first), (second));
}
template <class T>
inline void smin(T &first, T second) {
  first = min((first), (second));
}
const int maxn = 3e5 + 10;
int a[maxn], n, m;
struct node {
  int li, ri, ans, lans, rans;
  long long lz, f, s;
  node() {
    li = ri = ans = lans = rans = 1;
    lz = f = s = 0;
  }
} se[maxn * 4];
inline void mrg(int id, int l, int r) {
  int mid = (l + r) >> 1;
  se[id].li = se[((id) << 1)].li;
  se[id].ri = se[(((id) << 1) + 1)].ri;
  se[id].f = se[((id) << 1)].f;
  se[id].s = se[(((id) << 1) + 1)].s;
  se[id].lans = se[((id) << 1)].lans;
  se[id].rans = se[(((id) << 1) + 1)].rans;
  se[id].ans = max(se[((id) << 1)].ans, se[(((id) << 1) + 1)].ans);
  if (se[((id) << 1)].li == mid - l &&
      se[((id) << 1)].s > se[(((id) << 1) + 1)].f)
    smax(se[id].li, se[((id) << 1)].li + se[(((id) << 1) + 1)].li);
  if (se[(((id) << 1) + 1)].ri == r - mid &&
      se[((id) << 1)].s < se[(((id) << 1) + 1)].f)
    smax(se[id].ri, se[(((id) << 1) + 1)].ri + se[((id) << 1)].ri);
  if (se[((id) << 1)].s < se[(((id) << 1) + 1)].f) {
    if (se[(((id) << 1) + 1)].lans == r - mid)
      smax(se[id].rans, se[((id) << 1)].ri + se[(((id) << 1) + 1)].lans);
    smax(se[id].ans, se[((id) << 1)].ri + se[(((id) << 1) + 1)].lans);
    if (se[((id) << 1)].ri == mid - l)
      smax(se[id].lans, se[((id) << 1)].ri + se[(((id) << 1) + 1)].lans);
  } else if (se[((id) << 1)].s > se[(((id) << 1) + 1)].f) {
    if (se[((id) << 1)].rans == mid - l)
      smax(se[id].lans, se[((id) << 1)].rans + se[(((id) << 1) + 1)].li);
    smax(se[id].ans, se[((id) << 1)].rans + se[(((id) << 1) + 1)].li);
    if (se[(((id) << 1) + 1)].li == r - mid)
      smax(se[id].rans, se[((id) << 1)].rans + se[(((id) << 1) + 1)].li);
  }
  smax(se[id].lans, se[id].li);
  smax(se[id].rans, se[id].ri);
  smax(se[id].ans, max(se[id].lans, se[id].rans));
}
inline void add(int id, long long val) {
  se[id].lz += val;
  se[id].f += val;
  se[id].s += val;
}
inline void shift(int id) {
  add(((id) << 1), se[id].lz);
  add((((id) << 1) + 1), se[id].lz);
  se[id].lz = 0;
}
inline void build(int id = 1, int l = 0, int r = n) {
  if (r - l < 2) {
    se[id].f = se[id].s = a[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(((id) << 1), l, mid);
  build((((id) << 1) + 1), mid, r);
  mrg(id, l, r);
}
inline void upd(int first, int second, int val, int id = 1, int l = 0,
                int r = n) {
  if (first >= r or l >= second) return;
  if (first <= l && r <= second) {
    add(id, val);
    return;
  }
  int mid = (l + r) >> 1;
  shift(id);
  upd(first, second, val, ((id) << 1), l, mid);
  upd(first, second, val, (((id) << 1) + 1), mid, r);
  mrg(id, l, r);
}
int main() {
  scanf("%d", &n);
  for (int(i) = (0); (i) < (n); ++(i)) scanf("%d", a + i);
  build();
  scanf("%d", &m);
  while (m--) {
    int l, r, d;
    scanf("%d %d %d", &l, &r, &d);
    --l;
    upd(l, r, d);
    printf("%d\n", se[1].ans);
  }
  return 0;
}
