#include <bits/stdc++.h>
using namespace std;
const int N = 300010;
int n, m;
long long a[N];
int L[N * 4], R[N * 4], mx[N * 4];
inline int Min(int x, int y) { return x < y ? x : y; }
inline int Max(int x, int y) { return x > y ? x : y; }
inline int gl(int x, int y) { return x && y ? Min(x, y) : x + y; }
inline int gr(int x, int y) { return Max(x, y); }
inline int Val(int x, int y) {
  if (!x || !y) return 0;
  return y - x + (a[y] != 0);
}
void pushup(int u) {
  L[u] = gl(L[u * 2], L[u * 2 + 1]), R[u] = gr(R[u * 2], R[u * 2 + 1]);
  mx[u] = Max(Max(mx[u * 2], mx[u * 2 + 1]), Val(R[u * 2], L[u * 2 + 1]));
}
void mdy(int u, int l, int r, int x) {
  if (x > r || x < l) return;
  int mid = (l + r) >> 1;
  if (l < x || x < r)
    mdy(u * 2, l, mid, x), mdy(u * 2 + 1, mid + 1, r, x), pushup(u);
  else {
    if ((x == 1 || a[x] < 0) && (x == n || a[x + 1] > 0))
      L[u] = R[u] = x;
    else if (!a[x] || !a[x + 1])
      L[u] = R[u] = x;
    else
      L[u] = R[u] = 0;
    mx[u] = 1;
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  for (int i = n; i; i--) a[i] -= a[i - 1];
  for (int i = 1; i <= n; i++) mdy(1, 1, n, i);
  for (scanf("%d", &m); m; --m) {
    int x, y;
    long long d;
    scanf("%d%d%I64d", &x, &y, &d);
    a[x] += d, a[y + 1] -= d;
    mdy(1, 1, n, x - 1), mdy(1, 1, n, x);
    mdy(1, 1, n, y + 1), mdy(1, 1, n, y);
    printf("%d\n", Max(mx[1], Max(L[1], n - R[1] + 1)));
  }
  return 0;
}
