#include <bits/stdc++.h>
using namespace std;
const int N = 300005;
int n, m, l, r;
long long x;
long long a[N] = {};
long long f[N] = {};
int mx[4 * N] = {};
int pr[4 * N][3] = {};
int sf[4 * N][3] = {};
long long get(int i) {
  long long s = 0;
  for (; i >= 0; i = (i & (i + 1)) - 1) {
    s += f[i];
  }
  return s;
}
void upd(int i, long long val) {
  for (; i <= n; i |= i + 1) {
    f[i] += val;
  }
}
void upd(int v, int l, int mid, int r) {
  for (int i = 0; i < 2; i++) {
    pr[v][i] = pr[v * 2][i] + (pr[v * 2][i] == mid - l ? pr[v * 2 + 1][i] : 0);
    sf[v][i] =
        sf[v * 2 + 1][i] + (sf[v * 2 + 1][i] == r - mid ? sf[v * 2][i] : 0);
  }
  pr[v][2] =
      max(pr[v * 2][2] + (pr[v * 2][2] == mid - l ? pr[v * 2 + 1][0] : 0),
          pr[v * 2][1] + (pr[v * 2][1] == mid - l ? pr[v * 2 + 1][2] : 0));
  sf[v][2] =
      max(sf[v * 2 + 1][2] + (sf[v * 2 + 1][2] == r - mid ? sf[v * 2][1] : 0),
          sf[v * 2 + 1][0] + (sf[v * 2 + 1][0] == r - mid ? sf[v * 2][2] : 0));
  mx[v] =
      max({mx[v * 2], mx[v * 2 + 1], sf[v * 2][1] + pr[v * 2 + 1][0],
           sf[v * 2][2] + pr[v * 2 + 1][0], sf[v * 2][1] + pr[v * 2 + 1][2]});
}
void upd(int v, int l, int r, int pos, int val) {
  if (l == r - 1) {
    if (val == 1) {
      pr[v][0] = sf[v][0] = 0;
      pr[v][1] = sf[v][1] = pr[v][2] = sf[v][2] = 1;
    } else if (val == -1) {
      pr[v][1] = sf[v][1] = 0;
      pr[v][0] = sf[v][0] = pr[v][2] = sf[v][2] = 1;
    } else
      pr[v][0] = sf[v][0] = pr[v][1] = sf[v][1] = pr[v][2] = sf[v][2] = 0;
    if (val != 0)
      mx[v] = 1;
    else
      mx[v] = 0;
    return;
  }
  int mid = (l + r) / 2;
  if (pos < mid)
    upd(v * 2, l, mid, pos, val);
  else
    upd(v * 2 + 1, mid, r, pos, val);
  upd(v, l, mid, r);
}
void recalc(int i) {
  if (i > n) return;
  long long a = get(i), b = get(i - 1);
  if (i == 1)
    upd(1, 1, n + 1, 1, 0);
  else if (a > b)
    upd(1, 1, n + 1, i, 1);
  else if (a < b)
    upd(1, 1, n + 1, i, -1);
  else
    upd(1, 1, n + 1, i, 0);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    upd(i, a[i] - a[i - 1]);
    recalc(i);
  }
  cin >> m;
  for (int i = 0; i < m; i++) {
    cin >> l >> r >> x;
    upd(l, x);
    upd(r + 1, -x);
    recalc(l);
    recalc(r + 1);
    cout << mx[1] + 1 << "\n";
  }
  return 0;
}
