#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300000;
int l[MAXN * 4 + 10], r[MAXN * 4 + 10], ans[MAXN * 4 + 10];
long long val[MAXN + 10];
void push_up(const int& u, const int& l, const int& mid, const int& r) {
  ans[u] = max(ans[u << 1], ans[u << 1 | 1]);
  if (val[mid] > 0 || (val[mid] < 0 && val[mid + 1] < 0))
    ans[u] = max(ans[u], ::r[u << 1] + ::l[u << 1 | 1]);
  ::l[u] = ::l[u << 1];
  if (mid - l + 1 == ::l[u << 1] &&
      (val[mid] > 0 || (val[mid] < 0 && val[mid + 1] < 0)))
    ::l[u] += ::l[u << 1 | 1];
  ::r[u] = ::r[u << 1 | 1];
  if (r - mid == ::r[u << 1 | 1] &&
      (val[mid + 1] < 0 || (val[mid] > 0 && val[mid + 1] > 0)))
    ::r[u] += ::r[u << 1];
}
void Insert(int u, int l, int r, int pos) {
  if (l == r) {
    if (val[l]) ::l[u] = ::r[u] = ::ans[u] = 1;
    return;
  }
  int mid = (l + r) >> 1;
  if (pos <= mid)
    Insert(u << 1, l, mid, pos);
  else
    Insert(u << 1 | 1, mid + 1, r, pos);
  push_up(u, l, mid, r);
}
void build(int u, int l, int r) {
  if (l == r) {
    if (val[l]) ::l[u] = ::r[u] = ::ans[u] = 1;
    return;
  }
  int mid = (l + r) >> 1;
  build(u << 1, l, mid);
  build(u << 1 | 1, mid + 1, r);
  push_up(u, l, mid, r);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &val[i]);
  for (int i = n; i >= 1; i--) val[i] -= val[i - 1];
  val[1] = 0;
  build(1, 1, n);
  int m, li, ri, di;
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d%d", &li, &ri, &di);
    val[li] += di;
    val[1] = 0;
    Insert(1, 1, n, li);
    val[ri + 1] -= di;
    if (ri < n) Insert(1, 1, n, ri + 1);
    printf("%d\n", ans[1] + 1);
  }
  return 0;
}
