#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + 7;
const double eps = 1e-8;
const double PI = acos(-1);
int n, m;
long long lazy[N << 2];
struct Node {
  long long lv, rv;
  int mx, rup, rdn, lup, ldn;
  bool up, dn, mon;
  void print() {
    puts("");
    printf("lv: %lld  rv: %lld\n", lv, rv);
    printf("mx: %d\n", mx);
    printf("rup: %d  rdn: %d  lup: %d  ldn: %d\n", rup, rdn, lup, ldn);
    printf("up: %d  dn: %d  mon: %d\n", up, dn, mon);
    puts("");
  }
} a[N << 2];
Node operator+(const Node& a, const Node& b) {
  Node c;
  c.lv = a.lv;
  c.rv = b.rv;
  c.mx = max(a.mx, b.mx);
  c.rup = b.rup;
  c.rdn = b.rdn;
  c.lup = a.lup;
  c.ldn = a.ldn;
  if (a.rv < b.lv) c.mx = max(c.mx, a.rup + b.lup);
  if (a.rv > b.lv) c.mx = max(c.mx, a.rdn + b.ldn);
  if (a.rv != b.lv) c.mx = max(c.mx, a.rup + b.ldn);
  if (b.up && a.rv < b.lv) c.rup = max(c.rup, a.rup + b.rup);
  if (b.mon && a.rv < b.lv) c.rdn = max(c.rdn, a.rup + b.rdn);
  if (b.dn && a.rv > b.lv) c.rdn = max(c.rdn, a.rdn + b.rdn);
  if (a.mon && a.rv > b.lv) c.lup = max(c.lup, a.lup + b.ldn);
  if (a.up && a.rv < b.lv) c.lup = max(c.lup, a.lup + b.lup);
  if (a.dn && a.rv > b.lv) c.ldn = max(c.ldn, a.ldn + b.ldn);
  c.up = a.up && b.up && a.rv < b.lv;
  c.dn = a.dn && b.dn && a.rv > b.lv;
  c.mon = false;
  if (c.up || c.dn)
    c.mon = true;
  else {
    if (a.up && b.dn && a.rv != b.lv) c.mon = true;
    if (a.mon && b.dn && a.rv > b.lv) c.mon = true;
    if (b.mon && a.up && a.rv < b.lv) c.mon = true;
  }
  return c;
}
void push(int rt) {
  if (lazy[rt]) {
    a[rt << 1].lv += lazy[rt];
    a[rt << 1].rv += lazy[rt];
    a[rt << 1 | 1].lv += lazy[rt];
    a[rt << 1 | 1].rv += lazy[rt];
    lazy[rt << 1] += lazy[rt];
    lazy[rt << 1 | 1] += lazy[rt];
    lazy[rt] = 0;
  }
}
void build(int l, int r, int rt) {
  if (l == r) {
    int x;
    scanf("%d", &x);
    a[rt] = Node{x, x, 1, 1, 1, 1, 1, 1, 1, 1};
    return;
  }
  int mid = l + r >> 1;
  build(l, mid, rt << 1);
  build(mid + 1, r, rt << 1 | 1);
  a[rt] = a[rt << 1] + a[rt << 1 | 1];
}
void update(int L, int R, int val, int l, int r, int rt) {
  if (l >= L && r <= R) {
    a[rt].lv += val;
    a[rt].rv += val;
    lazy[rt] += val;
    return;
  }
  int mid = l + r >> 1;
  push(rt);
  if (L <= mid) update(L, R, val, l, mid, rt << 1);
  if (R > mid) update(L, R, val, mid + 1, r, rt << 1 | 1);
  a[rt] = a[rt << 1] + a[rt << 1 | 1];
}
int main() {
  scanf("%d", &n);
  build(1, n, 1);
  scanf("%d", &m);
  while (m--) {
    int L, R, d;
    scanf("%d%d%d", &L, &R, &d);
    update(L, R, d, 1, n, 1);
    printf("%d\n", a[1].mx);
  }
  return 0;
}
