#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300005;
int n;
int Read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x * 10) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
void Put1(int x) {
  if (x > 9) Put1(x / 10);
  putchar(x % 10 ^ 48);
}
void Put(int x, char c = -1) {
  if (x < 0) putchar('-'), x = -x;
  Put1(x);
  if (c >= 0) putchar(c);
}
template <typename T>
T Max(T x, T y) {
  return x > y ? x : y;
}
template <typename T>
T Min(T x, T y) {
  return x < y ? x : y;
}
template <typename T>
T Abs(T x) {
  return x < 0 ? -x : x;
}
struct SegmentTree {
  struct node {
    int ul, ur, dl, dr, udl, udr, ans;
    long long lz, l, r;
  } t[MAXN << 2];
  void up(int x, int l, int mid, int r) {
    t[x].l = t[(x << 1)].l;
    t[x].r = t[(x << 1 | 1)].r;
    t[x].ans = Max(t[(x << 1)].ans, t[(x << 1 | 1)].ans);
    int llen = mid - l + 1, rlen = r - mid;
    t[x].ul = t[(x << 1)].ul;
    t[x].dl = t[(x << 1)].dl;
    t[x].ur = t[(x << 1 | 1)].ur;
    t[x].dr = t[(x << 1 | 1)].dr;
    t[x].udl = t[(x << 1)].udl;
    t[x].udr = t[(x << 1 | 1)].udr;
    if (t[(x << 1)].r < t[(x << 1 | 1)].l) {
      if (t[(x << 1)].ul == llen) t[x].ul += t[(x << 1 | 1)].ul;
      if (t[(x << 1 | 1)].ur == rlen) t[x].ur += t[(x << 1)].ur;
      if (t[(x << 1 | 1)].udr == rlen) t[x].udr += t[(x << 1)].ur;
      if (t[(x << 1)].ul == llen)
        t[x].udl = Max(t[x].udl, llen + t[(x << 1 | 1)].udl);
      t[x].ans = Max(t[x].ans, t[(x << 1 | 1)].udl + t[(x << 1)].ur);
    } else if (t[(x << 1)].r > t[(x << 1 | 1)].l) {
      if (t[(x << 1)].dl == llen) t[x].dl += t[(x << 1 | 1)].dl;
      if (t[(x << 1 | 1)].dr == rlen) t[x].dr += t[(x << 1)].dr;
      if (t[(x << 1)].udl == llen) t[x].udl += t[(x << 1 | 1)].dl;
      if (t[(x << 1 | 1)].dr == rlen)
        t[x].udr = Max(t[x].udr, rlen + t[(x << 1)].udr);
      t[x].ans = Max(t[x].ans, t[(x << 1)].udr + t[(x << 1 | 1)].dl);
    }
    t[x].udl = Max(t[x].udl, t[x].ul);
    t[x].udr = Max(t[x].udr, t[x].dr);
    t[x].ans = Max(t[x].ans, t[x].udl);
    t[x].ans = Max(t[x].ans, t[x].udr);
    if (t[(x << 1)].r != t[(x << 1 | 1)].l)
      t[x].ans = Max(t[x].ans, t[(x << 1)].ur + t[(x << 1 | 1)].dl);
  }
  void down(int x) {
    if (!t[x].lz) return;
    t[(x << 1)].l += t[x].lz;
    t[(x << 1)].r += t[x].lz;
    t[(x << 1)].lz += t[x].lz;
    t[(x << 1 | 1)].l += t[x].lz;
    t[(x << 1 | 1)].r += t[x].lz;
    t[(x << 1 | 1)].lz += t[x].lz;
    t[x].lz = 0;
  }
  void Build(int x, int l, int r) {
    if (l == r) {
      t[x].l = t[x].r = Read();
      t[x].ul = t[x].ur = t[x].dl = t[x].dr = t[x].udl = t[x].udr = 1;
      t[x].ans = 1;
      t[x].lz = 0;
      return;
    }
    int mid = (l + r) >> 1;
    Build((x << 1), l, mid);
    Build((x << 1 | 1), mid + 1, r);
    up(x, l, mid, r);
  }
  void Add(int x, int l, int r, int ql, int qr, int val) {
    if (ql <= l && r <= qr) {
      t[x].l += val;
      t[x].r += val;
      t[x].lz += val;
      return;
    }
    int mid = (l + r) >> 1;
    down(x);
    if (ql <= mid) Add((x << 1), l, mid, ql, qr, val);
    if (mid + 1 <= qr) Add((x << 1 | 1), mid + 1, r, ql, qr, val);
    up(x, l, mid, r);
  }
} st;
int main() {
  n = Read();
  st.Build(1, 1, n);
  for (int T = Read(); T; --T) {
    int l = Read(), r = Read(), val = Read();
    st.Add(1, 1, n, l, r, val);
    Put(st.t[1].ans, '\n');
  }
  return 0;
}
