#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3e5 + 10;
int n, m;
long long d[2 * MAXN];
long long lb[4 * MAXN], le[4 * MAXN], l[4 * MAXN];
int sign(long long a) {
  if (a == 0) {
    return 0;
  } else {
    return (a > 0 ? 1 : -1);
  }
}
void build(int v, int tl, int tr) {
  if (tl == tr) {
    if (d[tl] != 0) {
      lb[v] = 1;
      le[v] = 1;
      l[v] = 1;
    } else {
      lb[v] = 0;
      le[v] = 0;
      l[v] = 0;
    }
  } else {
    int tm = (tl + tr) / 2;
    build(v * 2, tl, tm);
    build(v * 2 + 1, tm + 1, tr);
    lb[v] = lb[2 * v];
    if (lb[v] == tm - tl + 1) {
      if (sign(d[tm]) != 0 && sign(d[tm + 1]) != 0 &&
          sign(d[tm]) >= sign(d[tm + 1])) {
        lb[v] += lb[2 * v + 1];
      }
    }
    le[v] = le[2 * v + 1];
    if (le[v] == tr - tm) {
      if (sign(d[tm]) != 0 && sign(d[tm + 1]) != 0 &&
          sign(d[tm]) >= sign(d[tm + 1])) {
        le[v] += le[2 * v];
      }
    }
    l[v] = max(l[2 * v], l[2 * v + 1]);
    if (sign(d[tm]) != 0 && sign(d[tm + 1]) != 0 &&
        sign(d[tm]) >= sign(d[tm + 1])) {
      l[v] = max(l[v], le[2 * v] + lb[2 * v + 1]);
    }
  }
}
void update(int v, int tl, int tr, int li, int ri) {
  if (li > ri || tl > tr) return;
  if (li == tl && tr == ri) {
    if (d[tl] != 0) {
      lb[v] = 1;
      le[v] = 1;
      l[v] = 1;
    } else {
      lb[v] = 0;
      le[v] = 0;
      l[v] = 0;
    }
  } else {
    int tm = (tl + tr) / 2;
    update(v * 2, tl, tm, li, min(ri, tm));
    update(v * 2 + 1, tm + 1, tr, max(li, tm + 1), ri);
    lb[v] = lb[2 * v];
    if (lb[v] == tm - tl + 1) {
      if (sign(d[tm]) != 0 && sign(d[tm + 1]) != 0 &&
          sign(d[tm]) >= sign(d[tm + 1])) {
        lb[v] += lb[2 * v + 1];
      }
    }
    le[v] = le[2 * v + 1];
    if (le[v] == tr - tm) {
      if (sign(d[tm]) != 0 && sign(d[tm + 1]) != 0 &&
          sign(d[tm]) >= sign(d[tm + 1])) {
        le[v] += le[2 * v];
      }
    }
    l[v] = max(l[2 * v], l[2 * v + 1]);
    if (sign(d[tm]) != 0 && sign(d[tm + 1]) != 0 &&
        sign(d[tm]) >= sign(d[tm + 1])) {
      l[v] = max(l[v], le[2 * v] + lb[2 * v + 1]);
    }
  }
}
void echo() {
  for (int i = 0; i < n; i++) {
    printf("%d ", d[i]);
  }
  cout << endl;
}
int main() {
  cin >> n;
  int END = 1, nn = n;
  while (nn > 0) {
    END *= 2;
    nn /= 2;
  }
  END--;
  long long cur;
  cin >> cur;
  for (int i = 1; i < n; i++) {
    d[i] = -cur;
    scanf("%I64d", &cur);
    d[i] += cur;
  }
  d[0] = 0;
  d[n] = 0;
  build(1, 0, END);
  cin >> m;
  for (int i = 0; i < m; i++) {
    int li, ri, q;
    scanf("%d %d %d", &li, &ri, &q);
    d[li - 1] += q;
    d[ri] -= q;
    d[0] = 0;
    d[n] = 0;
    update(1, 0, END, li - 1, li - 1);
    update(1, 0, END, ri, ri);
    printf("%I64d\n", l[1] + 1);
  }
  return 0;
}
