#include <bits/stdc++.h>
#pragma comment(linker, "/stack:20000000")
using namespace std;
template <class T>
int sign(T x) {
  return x > 0 ? 1 : x < 0 ? -1 : 0;
}
struct Node {
  int lval, mval, rval;
};
Node tr[2340400];
long long a[1010101];
inline void recalc(int cur, int l, int r) {
  int m = (l + r) / 2;
  int dcur = cur + cur;
  tr[cur].mval = max(tr[dcur].mval, tr[dcur + 1].mval);
  if (!a[m] || !a[m + 1] || sign(a[m]) < sign(a[m + 1])) {
    tr[cur].lval = tr[dcur].lval;
    tr[cur].rval = tr[dcur + 1].rval;
  } else {
    tr[cur].mval = max(tr[cur].mval, tr[dcur].rval + tr[dcur + 1].lval);
    if (tr[dcur].mval == m - l + 1) {
      tr[cur].lval = tr[dcur].lval + tr[dcur + 1].lval;
    } else {
      tr[cur].lval = tr[dcur].lval;
    }
    if (tr[dcur + 1].mval == r - m) {
      tr[cur].rval = tr[dcur + 1].rval + tr[dcur].rval;
    } else {
      tr[cur].rval = tr[dcur + 1].rval;
    }
  }
}
void build(int cur, int l, int r) {
  if (l == r) {
    int x = !!a[l];
    tr[cur] = {x, x, x};
  } else {
    int m = (l + r) / 2;
    int dcur = cur + cur;
    build(dcur, l, m);
    build(dcur + 1, m + 1, r);
    recalc(cur, l, r);
  }
}
void update(int cur, int l, int r, int pos, int val) {
  if (l == r) {
    a[pos] += val;
    int x = !!a[l];
    tr[cur] = {x, x, x};
  } else {
    int m = (l + r) / 2;
    int dcur = cur + cur;
    if (pos <= m) {
      update(dcur, l, m, pos, val);
    } else {
      update(dcur + 1, m + 1, r, pos, val);
    }
    recalc(cur, l, r);
  }
}
int arr[1010101];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  for (int i = 0; i < n - 1; ++i) {
    a[i] = arr[i + 1] - arr[i];
  }
  if (n > 1) {
    build(1, 0, n - 2);
  }
  int m;
  scanf("%d", &m);
  while (m--) {
    int l, r, d;
    scanf("%d%d%d", &l, &r, &d);
    if (n == 1) {
      puts("1");
      continue;
    }
    if (l != 1) {
      update(1, 0, n - 2, l - 2, d);
    }
    if (r != n) {
      update(1, 0, n - 2, r - 1, -d);
    }
    printf("%d\n", tr[1].mval + 1);
  }
  return 0;
}
