#include <bits/stdc++.h>
using namespace std;
const int inf = 1.01e9;
const double eps = 1e-9;
const int N = 1 << 19;
long long t[N];
void upd(int x, int val) {
  x++;
  for (; x < N; x += x & -x) t[x] += val;
}
inline long long get(int x) {
  x++;
  long long res = 0;
  for (; x > 0; x -= x & -x) res += t[x];
  return res;
}
int a[N];
struct T {
  int leftFall, rightRise, midVal, rockleft, rockright, len;
  T() {}
  void out() {
    fprintf(stderr, "lf %d rr %d mid %d rockleft %d rockright %d len %d\n",
            leftFall, rightRise, midVal, rockleft, rockright, len),
        fflush(stderr);
  }
};
T z[2 * N];
int arr[N];
T init(int x) {
  T res;
  res.len = 1;
  if (x == 1) {
    res.leftFall = 0;
    res.rightRise = 1;
    res.midVal = 1;
    res.rockleft = 1;
    res.rockright = 1;
  } else if (x == -1) {
    res.leftFall = 1;
    res.rightRise = 0;
    res.midVal = 1;
    res.rockleft = 1;
    res.rockright = 1;
  } else {
    res.leftFall = 0;
    res.rightRise = 0;
    res.midVal = 0;
    res.rockleft = 0;
    res.rockright = 0;
  }
  return res;
}
T calc(T A, T B) {
  T res;
  res.len = A.len + B.len;
  res.leftFall = A.leftFall;
  if (A.leftFall == A.len) res.leftFall = A.len + B.leftFall;
  res.rightRise = B.rightRise;
  if (B.rightRise == B.len) res.rightRise = B.len + A.rightRise;
  res.midVal = max(A.midVal, B.midVal);
  res.midVal = max(res.midVal, A.rightRise + B.leftFall);
  if (A.rockright) {
    res.midVal = max(res.midVal, A.rockright + B.leftFall);
  }
  if (B.rockleft) {
    res.midVal = max(res.midVal, B.rockleft + A.rightRise);
  }
  res.rockleft = A.rockleft;
  if (A.rockleft == A.len) res.rockleft += B.leftFall;
  res.rockright = B.rockright;
  if (B.rockright == B.len) res.rockright += A.rightRise;
  if (res.rockleft == res.len) res.rockright = res.len;
  if (res.rockright == res.len) res.rockleft = res.len;
  if (A.rightRise == A.len)
    res.rockleft = max(res.rockleft, A.len + B.rockleft);
  if (B.leftFall == B.len)
    res.rockright = max(res.rockright, B.len + A.rockright);
  return res;
}
void UPD(int x, int val) {
  arr[x] = val;
  x += N;
  z[x] = init(val);
  while (x > 1) {
    x >>= 1;
    z[x] = calc(z[2 * x], z[2 * x + 1]);
  }
}
int sign(long long x) {
  if (x > 0) return 1;
  if (x < 0) return -1;
  return 0;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; (i) < (n); ++i) scanf("%d", &a[i]);
  int prev = 0;
  for (int i = 0; (i) < (n); ++i) {
    upd(i, a[i] - prev);
    prev = a[i];
  }
  for (int i = 0; (i) < (n); ++i) assert(get(i) == a[i]);
  for (int i = 0; (i) < (n - 1); ++i) arr[i] = sign(a[i + 1] - a[i]);
  for (int i = 0; (i) < (N); ++i) z[i + N] = init(arr[i]);
  for (int i = N - 1; i > 0; --i) z[i] = calc(z[2 * i], z[2 * i + 1]);
  int m;
  scanf("%d", &m);
  for (int i = 0; (i) < (m); ++i) {
    int l, r, d;
    scanf("%d%d%d", &l, &r, &d);
    --l, --r;
    upd(l, d);
    upd(r + 1, -d);
    if (l > 0) {
      long long x1 = get(l - 1);
      long long x2 = get(l);
      int val = sign(x2 - x1);
      UPD(l - 1, val);
    }
    if (r + 1 < n) {
      long long x1 = get(r);
      long long x2 = get(r + 1);
      int val = sign(x2 - x1);
      UPD(r, val);
    }
    printf("%d\n", z[1].midVal + 1);
  }
  return 0;
}
