#include <bits/stdc++.h>
using namespace std;
void getre() {
  int x = 0;
  printf("%d\n", 1 / x);
}
void gettle() {
  int res = 1;
  while (1) res <<= 1;
  printf("%d\n", res);
}
template <typename T, typename S>
inline bool upmin(T &a, const S &b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T, typename S>
inline bool upmax(T &a, const S &b) {
  return a < b ? a = b, 1 : 0;
}
template <typename N, typename PN>
inline N flo(N a, PN b) {
  return a >= 0 ? a / b : -((-a - 1) / b) - 1;
}
template <typename N, typename PN>
inline N cei(N a, PN b) {
  return a > 0 ? (a - 1) / b + 1 : -(-a / b);
}
template <typename N>
N gcd(N a, N b) {
  return b ? gcd(b, a % b) : a;
}
template <typename N>
inline int sgn(N a) {
  return a > 0 ? 1 : (a < 0 ? -1 : 0);
}
inline void gn(long long &x) {
  int sg = 1;
  char c;
  while (((c = getchar()) < '0' || c > '9') && c != '-')
    ;
  c == '-' ? (sg = -1, x = 0) : (x = c - '0');
  while ((c = getchar()) >= '0' && c <= '9') x = x * 10 + c - '0';
  x *= sg;
}
inline void gn(int &x) {
  long long t;
  gn(t);
  x = t;
}
inline void gn(unsigned long long &x) {
  long long t;
  gn(t);
  x = t;
}
inline void gn(double &x) {
  double t;
  scanf("%lf", &t);
  x = t;
}
inline void gn(long double &x) {
  double t;
  scanf("%lf", &t);
  x = t;
}
inline void gs(char *s) { scanf("%s", s); }
inline void gc(char &c) {
  while ((c = getchar()) > 126 || c < 33)
    ;
}
inline void pc(char c) { putchar(c); }
inline long long sqr(long long a) { return a * a; }
inline double sqrf(double a) { return a * a; }
const int inf = 0x3f3f3f3f;
const double pi = 3.14159265358979323846264338327950288L;
const double eps = 1e-6;
int a[333333];
struct data {
  int leflen, riglen;
  int leflen1, riglen1;
  int midlen;
  int len;
  long long lefnum, rignum;
} zero, one;
data operator+(const data &a, const data &b) {
  data c = zero;
  c.lefnum = a.lefnum;
  c.rignum = b.rignum;
  c.len = a.len + b.len;
  c.leflen =
      a.leflen == a.len && a.rignum > b.lefnum ? a.len + b.leflen : a.leflen;
  c.riglen =
      b.riglen == b.len && a.rignum < b.lefnum ? a.riglen + b.len : b.riglen;
  c.leflen1 =
      a.leflen1 == a.len && a.rignum > b.lefnum ? a.len + b.leflen : a.leflen1;
  c.riglen1 =
      b.riglen1 == b.len && a.rignum < b.lefnum ? b.len + a.riglen : b.riglen1;
  if (a.riglen == a.len && a.rignum < b.lefnum)
    upmax(c.leflen1, a.len + b.leflen1);
  if (b.leflen == b.len && a.rignum > b.lefnum)
    upmax(c.riglen1, b.len + a.riglen1);
  c.midlen = max(a.midlen, b.midlen);
  if (a.rignum > b.lefnum) {
    upmax(c.midlen, a.riglen1 + b.leflen);
  } else if (a.rignum < b.lefnum) {
    upmax(c.midlen, a.riglen + b.leflen1);
  }
  return c;
}
void operator+=(data &a, long long b) {
  a.lefnum += b;
  a.rignum += b;
}
int n;
const int SEG_MAXN = 300000 + 5;
int seglen[SEG_MAXN * 4];
data seg[SEG_MAXN * 4];
long long tag[SEG_MAXN * 4];
long long tag0 = 0;
inline void segadd(int x, long long v) {
  seg[x] += v;
  tag[x] = tag[x] + v;
}
inline void segpd(int x) {
  if (tag[x] != tag0) {
    segadd(x << 1, tag[x]);
    segadd(x << 1 | 1, tag[x]);
    tag[x] = tag0;
  }
}
inline void segpu(int x) { seg[x] = seg[x << 1] + seg[x << 1 | 1]; }
void seginit_in(int l, int r, int x) {
  tag[x] = tag0;
  seglen[x] = r - l + 1;
  if (l == r) {
    seg[x] = one;
    seg[x].lefnum = seg[x].rignum = a[l];
  } else {
    int mid = l + r >> 1;
    seginit_in(l, mid, x << 1);
    seginit_in(mid + 1, r, x << 1 | 1);
    segpu(x);
  }
}
int l1, r1;
data sans;
bool ans_bo;
long long stag;
void segupd_in(int l, int r, int x) {
  if (l1 <= l && r <= r1) {
    segadd(x, stag);
  } else {
    int mid = l + r >> 1;
    segpd(x);
    if (l1 <= mid) segupd_in(l, mid, x << 1);
    if (r1 > mid) segupd_in(mid + 1, r, x << 1 | 1);
    segpu(x);
  }
}
void segque_in(int l, int r, int x) {
  if (l1 <= l && r <= r1) {
    if (!ans_bo)
      ans_bo = 1, sans = seg[x];
    else
      sans = sans + seg[x];
  } else {
    int mid = l + r >> 1;
    segpd(x);
    if (l1 <= mid) segque_in(l, mid, x << 1);
    if (r1 > mid) segque_in(mid + 1, r, x << 1 | 1);
  }
}
int segn;
void segupd(int l, int r, long long v) {
  if (l > r) return;
  stag = v, l1 = l, r1 = r;
  segupd_in(1, segn, 1);
}
data segque(int l, int r) {
  ans_bo = 0, l1 = l, r1 = r;
  segque_in(1, segn, 1);
  return sans;
}
void seginit(int n) {
  segn = n;
  seginit_in(1, segn, 1);
}
int main() {
  one.leflen = one.riglen = one.leflen1 = one.riglen1 = one.midlen = one.len =
      1;
  gn(n);
  for (int i = (1), _ed = (n + 1); i < _ed; i++) gn(a[i]);
  seginit(n);
  int m;
  gn(m);
  while (m--) {
    int l, r, d;
    gn(l);
    gn(r);
    gn(d);
    segupd(l, r, d);
    data tmp = seg[1];
    printf("%d\n", tmp.midlen);
  }
  return 0;
}
