#include <bits/stdc++.h>
using namespace std;
struct treenode {
  int max, L, R;
};
treenode tree[2000000];
long long g[500000];
int i, m, n, x, y, z;
inline void inserttree(int l, int r, int x, int node) {
  if (l == r) {
    if (g[l] < 0) tree[node] = (treenode){1, 1, 1};
    if (g[l] > 0) tree[node] = (treenode){1, 1, 1};
    if (g[l] == 0) tree[node] = (treenode){0, 0, 0};
  } else {
    int mid = (l + r) >> 1;
    if (x <= mid)
      inserttree(l, mid, x, node << 1);
    else
      inserttree(mid + 1, r, x, node << 1 | 1);
    tree[node].L = tree[node << 1].L;
    if ((tree[node << 1].L == mid - l + 1) &&
        ((g[mid] < 0) || (g[mid + 1] > 0)) && (g[mid] != 0) &&
        (g[mid + 1] != 0))
      tree[node].L = tree[node].L + tree[node << 1 | 1].L;
    tree[node].R = tree[node << 1 | 1].R;
    if ((tree[node << 1 | 1].R == r - mid) &&
        ((g[mid] < 0) || (g[mid + 1] > 0)) && (g[mid] != 0) &&
        (g[mid + 1] != 0))
      tree[node].R = tree[node].R + tree[node << 1].R;
    tree[node].max = max(tree[node << 1].max, tree[node << 1 | 1].max);
    if (((g[mid] < 0) || (g[mid + 1] > 0)) && (g[mid] != 0) &&
        (g[mid + 1] != 0))
      tree[node].max =
          max(tree[node].max, tree[node << 1].R + tree[node << 1 | 1].L);
  }
  return;
}
inline int fastscanf() {
  int t = 0;
  char c = getchar();
  while (!((c > 47) && (c < 58))) c = getchar();
  while ((c > 47) && (c < 58)) t = t * 10 + c - 48, c = getchar();
  return t;
}
inline void fastprintf(int x) {
  if (!x)
    putchar('0');
  else {
    char c[12];
    for (c[0] = 0; x > 0; x = x / 10) c[0]++, c[c[0]] = x % 10;
    for (; c[0] > 0; c[0]--) putchar(c[c[0]] + 48);
  }
  puts("");
  return;
}
int main() {
  n = fastscanf();
  for (i = 1; i <= n; i++) g[i] = fastscanf();
  for (i = 1; i <= n; i++) g[i] = g[i] - g[i + 1];
  n--;
  if (!n) {
    m = fastscanf();
    for (i = 1; i <= m; i++) fastprintf(1);
    return 0;
  }
  for (i = 1; i <= n; i++) inserttree(1, n, i, 1);
  m = fastscanf();
  for (i = 1; i <= m; i++) {
    x = fastscanf(), y = fastscanf(), z = fastscanf();
    g[x - 1] = g[x - 1] - z, g[y] = g[y] + z;
    if (x > 0) inserttree(1, n, x - 1, 1);
    inserttree(1, n, y, 1);
    fastprintf(tree[1].max + 1);
  }
  return 0;
}
