#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
const int MXN = 3e5 + 5;
const int OFF = 1 << 19;
int arr[MXN];
ll diff[MXN];
struct segtree {
  struct node {
    int pref, suff, best, l, r, len;
    friend node operator+(const node &l, const node &r) {
      int pref = l.pref;
      int suff = r.suff;
      int best = max(l.best, r.best);
      if (l.r && r.l && l.r >= r.l) {
        best = max(best, l.suff + r.pref);
        if (l.pref == l.len) best = max(best, pref = l.pref + r.pref);
        if (r.suff == r.len) best = max(best, suff = l.suff + r.suff);
      }
      return {pref, suff, best, l.l, r.r, l.len + r.len};
    }
  };
  node tree[2 * OFF];
  void update(int pos, int v) {
    tree[pos += OFF] = {!!v, !!v, !!v, v, v, 1};
    while (pos /= 2) {
      tree[pos] = tree[2 * pos] + tree[2 * pos + 1];
    }
  }
} seg;
void update(int i, int dx) {
  diff[i] += dx;
  if (diff[i] > 0) seg.update(i, +1);
  if (diff[i] < 0) seg.update(i, -1);
  if (diff[i] == 0) seg.update(i, 0);
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
  }
  for (int i = 1; i < n; ++i) {
    update(i, arr[i + 1] - arr[i]);
  }
  int m;
  cin >> m;
  for (int i = 0; i < m; ++i) {
    int l, r, d;
    cin >> l >> r >> d;
    if (l > 1) update(l - 1, d);
    if (r < n) update(r, -d);
    cout << seg.tree[1].best + 1 << '\n';
  }
}
