#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int L, R;
long long lazy[N * 4], a[N];
void update(int pos, int l, int r, long long c) {
  int mid = (l + r) >> 1;
  if (r < L || R < l) return;
  if (L <= l && r <= R) {
    lazy[pos] += c;
    return;
  }
  update(pos * 2, l, mid, c);
  update(pos * 2 + 1, mid + 1, r, c);
}
inline long long get(int pos, int l, int r) {
  int mid = (l + r) >> 1;
  if (lazy[pos] > 0) {
    long long temp = lazy[pos];
    if (l != r) {
      lazy[pos * 2] += temp;
      lazy[pos * 2 + 1] += temp;
      lazy[pos] = 0;
    }
  }
  if (r < L || R < l) assert(0);
  if (L <= l && r <= R) return lazy[pos];
  if (l <= L && R <= mid) return get(pos * 2, l, mid);
  return get(pos * 2 + 1, mid + 1, r);
}
int v[N], n;
struct val {
  int x[7];
  val() { memset(x, 0, sizeof(x)); }
} tree[N * 4];
inline int comp(int x) {
  int l = L, r = R;
  L = x, R = x;
  long long u = a[x] + get(1, 1, n), v;
  L = x + 1, R = x + 1;
  v = a[x + 1] + get(1, 1, n);
  L = l, R = r;
  if (u < v) return 1;
  if (u > v) return 2;
  return 0;
}
void update(int pos, int l, int r, int k) {
  int mid = (l + r) >> 1;
  if (r < L || R < l) return;
  if (L <= l && r <= R) {
    memset(tree[pos].x, 0, sizeof(tree[pos].x));
    if (k == 1) tree[pos].x[0] = tree[pos].x[3] = tree[pos].x[6] = 1;
    if (k == 2) tree[pos].x[2] = tree[pos].x[5] = tree[pos].x[6] = 1;
    return;
  }
  update(pos * 2, l, mid, k);
  update(pos * 2 + 1, mid + 1, r, k);
  int i, u = pos * 2, v = pos * 2 + 1, len1 = mid - l + 1, len2 = r - mid,
         maxi = max(tree[u].x[6], tree[v].x[6]);
  for (i = 0; i < 3; ++i) tree[pos].x[i] = tree[u].x[i];
  for (i = 3; i < 6; ++i) tree[pos].x[i] = tree[v].x[i];
  if (len1 == tree[u].x[0]) {
    tree[pos].x[0] += tree[v].x[0];
    if (max(tree[v].x[1], tree[v].x[2]) > 0)
      tree[pos].x[1] =
          max(tree[pos].x[1], tree[u].x[0] + max(tree[v].x[1], tree[v].x[2]));
  }
  if (len1 == tree[u].x[1])
    tree[pos].x[1] = max(tree[pos].x[1], tree[u].x[1] + tree[v].x[2]);
  if (len1 == tree[u].x[2]) tree[pos].x[2] += tree[v].x[2];
  if (len2 == tree[v].x[3]) {
    tree[pos].x[3] += tree[u].x[3];
  }
  if (len2 == tree[v].x[4]) tree[pos].x[4] += tree[u].x[3];
  if (len2 == tree[v].x[5]) {
    tree[pos].x[5] += tree[u].x[5];
    if (max(tree[u].x[4], tree[u].x[3]) > 0)
      tree[pos].x[4] =
          max(tree[pos].x[4], max(tree[u].x[4], tree[u].x[3]) + tree[v].x[5]);
  }
  maxi = max(maxi,
             max(tree[v].x[2], max(tree[v].x[0], tree[v].x[1])) + tree[u].x[3]);
  maxi = max(maxi, max(tree[u].x[4], tree[u].x[5]) + tree[v].x[2]);
  for (i = 0; i < 6; ++i) maxi = max(maxi, tree[pos].x[i]);
  tree[pos].x[6] = maxi;
}
int main() {
  cin >> n;
  int i, j, m, l, r, x;
  for (i = 1; i <= n; ++i) scanf("%d", &x), a[i] = x;
  for (i = 1; i < n; ++i) L = R = i, update(1, 1, n - 1, comp(i));
  cin >> m;
  long long C;
  while (m--) {
    scanf("%d%d%d", &l, &r, &x);
    L = l, R = r, C = x;
    update(1, 1, n, C);
    l = L - 1, r = R;
    if (l > 0) L = l, R = l, update(1, 1, n - 1, comp(l));
    if (r < n) L = r, R = r, update(1, 1, n - 1, comp(r));
    cout << 1 + tree[1].x[6] << endl;
  }
  return 0;
}
