#include <bits/stdc++.h>
using namespace std;
const long long MaxN = 300050;
struct Node {
  long long Ans;
  long long l, r;
  long long uplen, downlen;
} tr[MaxN << 2];
template <class t>
inline void read(t &s) {
  s = 0;
  register long long f = 1;
  register char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) s = (s << 3) + (s << 1) + (c ^ 48), c = getchar();
  s *= f;
  return;
}
long long a[MaxN], inp[MaxN];
long long n;
inline long long getsign(long long x) {
  if (!x) return 0;
  return x > 0 ? 1 : -1;
}
inline void checkmax(long long &x, long long y) {
  if (x < y) x = y;
  return;
}
inline void pushup(long long u) {
  tr[u].Ans = max(tr[(u << 1)].Ans, tr[(u << 1 | 1)].Ans);
  checkmax(tr[u].Ans, max(tr[(u << 1)].uplen, tr[(u << 1 | 1)].downlen));
  if (!a[tr[(u << 1)].r] || !a[tr[(u << 1 | 1)].l] ||
      getsign(a[tr[(u << 1)].r]) < getsign(a[tr[(u << 1 | 1)].l])) {
    tr[u].uplen = tr[(u << 1)].uplen, tr[u].downlen = tr[(u << 1 | 1)].downlen;
  } else {
    checkmax(tr[u].Ans, tr[(u << 1)].downlen + tr[(u << 1 | 1)].uplen);
    if (tr[(u << 1)].uplen == tr[(u << 1)].r - tr[(u << 1)].l + 1)
      tr[u].uplen = tr[(u << 1)].uplen + tr[(u << 1 | 1)].uplen;
    else
      tr[u].uplen = tr[(u << 1)].uplen;
    if (tr[(u << 1 | 1)].downlen == tr[(u << 1 | 1)].r - tr[(u << 1 | 1)].l + 1)
      tr[u].downlen = tr[(u << 1 | 1)].downlen + tr[(u << 1)].downlen;
    else
      tr[u].downlen = tr[(u << 1 | 1)].downlen;
  }
  return;
}
inline void buildtr(long long u, long long l, long long r) {
  tr[u].l = l;
  tr[u].r = r;
  if (l == r) {
    if (!a[l])
      tr[u].Ans = tr[u].uplen = tr[u].downlen = 0;
    else
      tr[u].uplen = tr[u].downlen = tr[u].Ans = 1;
    return;
  }
  register long long mid = (l + r) >> 1;
  buildtr((u << 1), l, mid);
  buildtr((u << 1 | 1), mid + 1, r);
  pushup(u);
  return;
}
inline void modify(long long u, long long l, long long r, long long p,
                   long long k) {
  if (l == r) {
    a[l] += k;
    if (!a[l])
      tr[u].Ans = tr[u].uplen = tr[u].downlen = 0;
    else
      tr[u].Ans = tr[u].uplen = tr[u].downlen = 1;
    return;
  }
  register long long mid = (l + r) >> 1;
  if (p <= mid)
    modify((u << 1), l, mid, p, k);
  else
    modify((u << 1 | 1), mid + 1, r, p, k);
  pushup(u);
  return;
}
signed main(void) {
  long long m;
  cin >> n;
  for (long long i = 1; i <= n; ++i) read(inp[i]);
  if (n == 1) {
    cin >> m;
    for (long long i = 1; i <= m; ++i) puts("1");
    return 0;
  }
  for (long long i = 1; i < n; ++i) a[i] = inp[i + 1] - inp[i];
  buildtr(1, 1, n - 1);
  cin >> m;
  register long long l, r, d;
  for (long long i = 1; i <= m; ++i) {
    read(l);
    read(r);
    read(d);
    if (l != 1) modify(1, 1, n - 1, l - 1, d);
    if (r != n) modify(1, 1, n - 1, r, -d);
    printf("%lld\n", tr[1].Ans + 1);
  }
}
