#include <bits/stdc++.h>
using namespace std;
const int maxnum = 3 * 101000;
long long maxn[4 * maxnum], lnmax[4 * maxnum], lpnmax[4 * maxnum],
    rpmax[4 * maxnum], rpnmax[4 * maxnum];
long long diff[2 * maxnum];
int a[2 * maxnum], n, m;
void pushup(int o, int l, int r) {
  int mid = (l + r) / 2;
  maxn[o] = max(maxn[o << 1],
                max(maxn[o << 1 | 1], max(rpmax[o << 1] + lpnmax[o << 1 | 1],
                                          rpnmax[o << 1] + lnmax[o << 1 | 1])));
  lnmax[o] = lnmax[o << 1] == (mid - l + 1) ? mid - l + 1 + lnmax[o << 1 | 1]
                                            : lnmax[o << 1];
  lpnmax[o] = lpnmax[o << 1] == (mid - l + 1) ? mid - l + 1 + lnmax[o << 1 | 1]
                                              : lpnmax[o << 1];
  if (rpmax[o << 1] == mid - l + 1)
    lpnmax[o] = max(lpnmax[o], rpmax[o << 1] + lpnmax[o << 1 | 1]);
  rpmax[o] = rpmax[o << 1 | 1] == (r - mid) ? r - mid + rpmax[o << 1]
                                            : rpmax[o << 1 | 1];
  rpnmax[o] = rpnmax[o << 1 | 1] == (r - mid) ? r - mid + rpmax[o << 1]
                                              : rpnmax[o << 1 | 1];
  if (lnmax[o << 1 | 1] == r - mid)
    rpnmax[o] = max(rpnmax[o], rpnmax[o << 1] + lnmax[o << 1 | 1]);
}
void change(int o, int l) {
  if (diff[l] == 0)
    maxn[o] = lnmax[o] = lpnmax[o] = rpmax[o] = rpnmax[o] = 0;
  else if (diff[l] > 0) {
    lnmax[o] = 0;
    rpnmax[o] = lpnmax[o] = maxn[o] = rpmax[o] = 1;
  } else {
    rpmax[o] = 0;
    maxn[o] = lpnmax[o] = lnmax[o] = rpnmax[o] = 1;
  }
}
void build(int o, int l, int r) {
  if (l == r) {
    change(o, l);
    return;
  }
  int mid = (l + r) / 2;
  build(o << 1, l, mid);
  build(o << 1 | 1, mid + 1, r);
  pushup(o, l, r);
}
void update(int o, int l, int r, int k, int pos) {
  if (l == r) {
    diff[pos] += k;
    change(o, pos);
    return;
  }
  int mid = (l + r) / 2;
  if (pos <= mid)
    update(o << 1, l, mid, k, pos);
  else
    update(o << 1 | 1, mid + 1, r, k, pos);
  pushup(o, l, r);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    diff[i] = i == 1 ? 0 : a[i] - a[i - 1];
  }
  build(1, 1, n);
  scanf("%d", &m);
  int l, r, k;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d%d", &l, &r, &k);
    if (l != 1) update(1, 1, n, k, l);
    if (r != n) update(1, 1, n, -k, r + 1);
    printf("%I64d\n", maxn[1] + 1);
  }
  return 0;
}
