#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 5;
long long n, m, l, r, v;
long long a[N], ll[N << 2], rr[N << 2], tag[N << 2], maxn[N << 2],
    maxl1[N << 2], maxr1[N << 2], maxl2[N << 2], maxr2[N << 2];
inline long long max(long long a, long long b) { return a > b ? a : b; }
inline void pushup(long long k, long long l, long long r, long long mid) {
  ll[k] = ll[k << 1];
  rr[k] = rr[k << 1 | 1];
  maxl1[k] = maxl1[k << 1];
  if (maxl1[k << 1] == mid - l + 1 && rr[k << 1] > ll[k << 1 | 1])
    maxl1[k] += maxl1[k << 1 | 1];
  maxr1[k] = maxr1[k << 1 | 1];
  if (maxr1[k << 1 | 1] == r - (mid + 1) + 1 && rr[k << 1] < ll[k << 1 | 1])
    maxr1[k] += maxr1[k << 1];
  maxl2[k] = maxl2[k << 1];
  if (maxl2[k << 1] == mid - l + 1 && rr[k << 1] > ll[k << 1 | 1])
    maxl2[k] += maxl1[k << 1 | 1];
  if (maxr1[k << 1] == mid - l + 1 && rr[k << 1] < ll[k << 1 | 1])
    maxl2[k] = max(maxl2[k], maxr1[k << 1] + maxl2[k << 1 | 1]);
  maxr2[k] = maxr2[k << 1 | 1];
  if (maxr2[k << 1 | 1] == r - (mid + 1) + 1 && rr[k << 1] < ll[k << 1 | 1])
    maxr2[k] += maxr1[k << 1];
  if (maxl1[k << 1 | 1] == r - (mid + 1) + 1 && rr[k << 1] > ll[k << 1 | 1])
    maxr2[k] = max(maxr2[k], maxr2[k << 1] + maxl1[k << 1 | 1]);
  maxn[k] = max(maxn[k << 1], maxn[k << 1 | 1]);
  maxn[k] = max(maxn[k], max(maxl1[k], maxr1[k]));
  maxn[k] = max(maxn[k], max(maxl2[k], maxr2[k]));
  if (rr[k << 1] < ll[k << 1 | 1])
    maxn[k] = max(maxn[k], maxr1[k << 1] + maxl2[k << 1 | 1]);
  if (rr[k << 1] > ll[k << 1 | 1])
    maxn[k] = max(maxn[k], maxr2[k << 1] + maxl1[k << 1 | 1]);
}
void build(long long k, long long l, long long r) {
  if (l == r) {
    ll[k] = rr[k] = a[l];
    maxn[k] = maxl1[k] = maxl2[k] = maxr1[k] = maxr2[k] = 1;
    return;
  }
  long long mid = l + r >> 1;
  build(k << 1, l, mid);
  build(k << 1 | 1, mid + 1, r);
  pushup(k, l, r, mid);
}
inline void pushdown(long long k) {
  if (tag[k]) {
    ll[k << 1] += tag[k];
    rr[k << 1] += tag[k];
    ll[k << 1 | 1] += tag[k];
    rr[k << 1 | 1] += tag[k];
    tag[k << 1] += tag[k];
    tag[k << 1 | 1] += tag[k];
    tag[k] = 0;
  }
}
void change(long long k, long long l, long long r, long long qx, long long qy,
            long long v) {
  if (qx <= l && r <= qy) {
    tag[k] += v;
    ll[k] += v;
    rr[k] += v;
    return;
  }
  pushdown(k);
  long long mid = l + r >> 1;
  if (qx <= mid) change(k << 1, l, mid, qx, qy, v);
  if (mid < qy) change(k << 1 | 1, mid + 1, r, qx, qy, v);
  pushup(k, l, r, mid);
}
signed main() {
  scanf("%lld", &n);
  for (register long long i = 1; i <= n; ++i) scanf("%lld", &a[i]);
  build(1, 1, n);
  scanf("%lld", &m);
  while (m--) {
    scanf("%lld%lld%lld", &l, &r, &v);
    change(1, 1, n, l, r, v);
    printf("%lld\n", maxn[1]);
  }
  return 0;
}
