#include <bits/stdc++.h>
const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const long long MXLL = 4611686018427387903;
const int Sz = 1110111;
using namespace std;
inline void Read_rap() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
}
struct node {
  int l, m, r;
} t[Sz];
int n;
long long a[Sz];
inline int sign(long long x) {
  if (x < 0) return -1;
  if (x == 0) return 0;
  if (x > 0) return 1;
}
inline void recalc(int v, int tl, int tr) {
  int tmid = (tl + tr) >> 1;
  t[v].l = t[2 * v].l;
  t[v].r = t[2 * v + 1].r;
  t[v].m = max(t[2 * v].m, t[2 * v + 1].m);
  if (a[tmid] && a[tmid + 1] && sign(a[tmid]) >= sign(a[tmid + 1])) {
    t[v].m = max(t[v].m, t[2 * v].r + t[2 * v + 1].l);
    if (t[2 * v].l == tmid - tl + 1) t[v].l += t[2 * v + 1].l;
    if (t[2 * v + 1].r == tr - tmid) t[v].r += t[2 * v].r;
  }
}
void build(int v, int tl, int tr) {
  if (tl == tr) {
    bool b = (a[tl] != 0);
    t[v] = {b, b, b};
    return;
  }
  int tmid = (tl + tr) >> 1;
  build(2 * v, tl, tmid);
  build(2 * v + 1, tmid + 1, tr);
  recalc(v, tl, tr);
}
void upd(int v, int tl, int tr, int id, int x) {
  if (tl == tr) {
    a[id] += x;
    bool b = (a[id] != 0);
    t[v] = {b, b, b};
    return;
  }
  int tmid = (tl + tr) >> 1;
  if (id <= tmid)
    upd(2 * v, tl, tmid, id, x);
  else
    upd(2 * v + 1, tmid + 1, tr, id, x);
  recalc(v, tl, tr);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  n--;
  for (int i = 1; i <= n; i++) a[i] = (a[i + 1] - a[i]);
  a[n + 1] = -1;
  if (n) build(1, 1, n);
  int m;
  scanf("%d", &m);
  while (m--) {
    if (!n) {
      printf("1\n");
      continue;
    }
    int l, r, d;
    scanf("%d %d %d", &l, &r, &d);
    l--;
    if (l) upd(1, 1, n, l, d);
    if (r <= n) upd(1, 1, n, r, -d);
    printf("%d\n", max(t[1].m, max(t[1].l, t[1].r)) + 1);
  }
  return 0;
}
