#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
const int inf = 0x3f3f3f3f;
int n, q;
int a[N];
struct node {
  long long vl, vr, add;
  int a, b, ab, len, ac, bc;
  node() {
    add = 0;
    a = 0;
    b = 0;
    ab = ac = bc = 0;
  }
} t[N << 2];
void pushUp(int rt) {
  t[rt].vl = t[rt << 1].vl, t[rt].vr = t[rt << 1 | 1].vr;
  if (t[rt << 1 | 1].b == t[rt << 1 | 1].len &&
      t[rt << 1 | 1].vl > t[rt << 1].vr) {
    t[rt].b = t[rt << 1 | 1].b + t[rt << 1].b;
  } else
    t[rt].b = t[rt << 1 | 1].b;
  if (t[rt << 1].a == t[rt << 1].len && t[rt << 1].vr > t[rt << 1 | 1].vl) {
    t[rt].a = t[rt << 1].a + t[rt << 1 | 1].a;
  } else
    t[rt].a = t[rt << 1].a;
  if (t[rt << 1 | 1].bc == t[rt << 1 | 1].len &&
      t[rt << 1 | 1].vl > t[rt << 1].vr) {
    t[rt].bc = t[rt << 1 | 1].bc + t[rt << 1].b;
  } else
    t[rt].bc = t[rt << 1 | 1].bc;
  if (t[rt << 1 | 1].a == t[rt << 1 | 1].len &&
      t[rt << 1 | 1].vl < t[rt << 1].vr) {
    t[rt].bc = max(t[rt].bc, t[rt << 1 | 1].a + t[rt << 1].bc);
    t[rt].bc = max(t[rt].bc, t[rt << 1 | 1].a + t[rt << 1].b);
  }
  if (t[rt << 1].ac == t[rt << 1].len && t[rt << 1].vr > t[rt << 1 | 1].vl) {
    t[rt].ac = t[rt << 1].ac + t[rt << 1 | 1].a;
  } else
    t[rt].ac = t[rt << 1].ac;
  if (t[rt << 1].b == t[rt << 1].len && t[rt << 1].vr < t[rt << 1 | 1].vl) {
    t[rt].ac = max(t[rt].ac, t[rt << 1].b + t[rt << 1 | 1].ac);
    t[rt].ac = max(t[rt].ac, t[rt << 1].b + t[rt << 1 | 1].a);
  }
  t[rt].ab = 0;
  if (t[rt << 1].vr < t[rt << 1 | 1].vl)
    t[rt].ab = t[rt << 1].b + t[rt << 1 | 1].ac;
  if (t[rt << 1].vr > t[rt << 1 | 1].vl)
    t[rt].ab = t[rt << 1].bc + t[rt << 1 | 1].a;
  t[rt].ab = max(t[rt].ab, max(t[rt << 1].ab, t[rt << 1 | 1].ab));
  t[rt].ab = max(t[rt].ab, max(t[rt << 1].b, t[rt << 1].a));
  t[rt].ab = max(t[rt].ab, max(t[rt << 1 | 1].a, t[rt << 1 | 1].b));
  t[rt].ab = max(t[rt].ab, max(t[rt].a, t[rt].b));
  if (t[rt << 1].vr != t[rt << 1 | 1].vl)
    t[rt].ab = max(t[rt].ab, t[rt << 1].b + t[rt << 1 | 1].a);
  t[rt].ab = max(t[rt].ab, t[rt].ac);
  t[rt].ab = max(t[rt].ab, t[rt].bc);
}
void Build(int l, int r, int rt) {
  t[rt].len = r - l + 1;
  if (l == r) {
    t[rt].vl = t[rt].vr = a[l];
    t[rt].a = t[rt].b = t[rt].ab = t[rt].ac = t[rt].bc = 1;
    return;
  }
  int mid = (l + r) >> 1;
  Build(l, mid, rt << 1);
  Build(mid + 1, r, rt << 1 | 1);
  pushUp(rt);
}
void pushDown(int rt) {
  if (t[rt].add) {
    t[rt << 1].vl += t[rt].add;
    t[rt << 1].vr += t[rt].add;
    t[rt << 1].add += t[rt].add;
    t[rt << 1 | 1].vl += t[rt].add;
    t[rt << 1 | 1].vr += t[rt].add;
    t[rt << 1 | 1].add += t[rt].add;
    t[rt].add = 0;
  }
}
void update(int L, int R, int c, int l, int r, int rt) {
  if (L <= l && r <= R) {
    t[rt].vl += c;
    t[rt].vr += c;
    t[rt].add += c;
    return;
  }
  int mid = (l + r) >> 1;
  pushDown(rt);
  if (L <= mid) update(L, R, c, l, mid, rt << 1);
  if (R > mid) update(L, R, c, mid + 1, r, rt << 1 | 1);
  pushUp(rt);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = (1); i < (n + 1); ++i) cin >> a[i];
  Build(1, n, 1);
  int m;
  cin >> m;
  while (m--) {
    int l, r, d;
    cin >> l >> r >> d;
    update(l, r, d, 1, n, 1);
    cout << t[1].ab << endl;
  }
  return 0;
}
