#include <bits/stdc++.h>
using namespace std;
const int MAX = (int)3e5 + 10;
struct Node {
  long long vl, vr;
  int len;
  int seg_l, seg_r;
  int value_l, value_r, value;
  bool cd_l, cd_r;
  long long D;
  bool emp;
};
int n;
int a[MAX];
Node T[2 * MAX];
int h;
void init() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
}
Node combine(const Node& t1, const Node& t2) {
  if (t1.emp) return t2;
  if (t2.emp) return t1;
  Node t;
  t.emp = false;
  t.D = 0;
  t.vl = t1.vl;
  t.vr = t2.vr;
  t.len = t1.len + t2.len;
  t.seg_l = t1.seg_l;
  t.seg_r = t2.seg_r;
  if (t1.seg_l == t1.len && t2.vl < t1.vr) t.seg_l += t2.seg_l;
  if (t2.seg_r == t2.len && t1.vr < t2.vl) t.seg_r += t1.seg_r;
  t.value_l = t1.value_l;
  t.cd_l = t1.cd_l;
  if (t1.value_l == t1.len) {
    if (!t1.cd_l) {
      if (t1.vr > t2.vl) {
        t.cd_l = true;
        t.value_l += t2.seg_l;
      } else if (t1.vr < t2.vl) {
        if (t2.value_l >= t2.seg_l) {
          t.value_l += t2.value_l;
          t.cd_l = t2.cd_l;
        } else {
          t.value_l += t2.seg_l;
          t.cd_l = true;
        }
      }
    } else {
      if (t1.vr > t2.vl) t.value_l += t2.seg_l;
    }
  }
  t.value_r = t2.value_r;
  t.cd_r = t2.cd_r;
  if (t2.value_r == t2.len) {
    if (!t2.cd_r) {
      if (t2.vl > t1.vr) {
        t.cd_r = true;
        t.value_r += t1.seg_r;
      } else if (t2.vl < t1.vr) {
        if (t1.value_r >= t1.seg_r) {
          t.value_r += t1.value_r;
          t.cd_r = t1.cd_r;
        } else {
          t.value_r += t1.seg_r;
          t.cd_r = true;
        }
      }
    } else {
      if (t1.vr < t2.vl) t.value_r += t1.seg_r;
    }
  }
  t.value = max(t1.value, t2.value);
  t.value = max(t.value, max(t.value_l, t.value_r));
  t.value = max(t.value, max(t.seg_l, t.seg_r));
  if (t1.vr != t2.vl) t.value = max(t.value, t1.seg_r + t2.seg_l);
  if (t1.vr > t2.vl) t.value = max(t.value, t1.value_r + t2.seg_l);
  if (t1.vr < t2.vl) t.value = max(t.value, t1.seg_r + t2.value_l);
  return t;
}
void apply(Node& t, long long value) {
  t.vl += value;
  t.vr += value;
  if (t.len > 1) t.D += value;
}
void push(int p) {
  for (int s = h; s > 0; s--) {
    int i = p >> s;
    if (T[i].D != 0) {
      apply(T[i << 1], T[i].D);
      apply(T[i << 1 | 1], T[i].D);
      T[i].D = 0;
    }
  }
}
void build(int p) {
  for (p >>= 1; p >= 1; p >>= 1)
    if (T[p].D == 0) T[p] = combine(T[p << 1], T[p << 1 | 1]);
}
void modify(int l, int r, int value) {
  l += n - 1;
  r += n;
  int l0 = l, r0 = r;
  push(l0);
  push(r0 - 1);
  for (; l < r; l >>= 1, r >>= 1) {
    if (l & 1) apply(T[l++], value);
    if (r & 1) apply(T[--r], value);
  }
  build(l0);
  build(r0 - 1);
}
Node query(int l, int r) {
  l += n - 1;
  r += n;
  push(l);
  push(r - 1);
  Node resl, resr;
  resl.emp = resr.emp = true;
  for (; l < r; l >>= 1, r >>= 1) {
    if (l & 1) resl = combine(resl, T[l++]);
    if (r & 1) resr = combine(T[--r], resr);
  }
  return combine(resl, resr);
}
void construct_segment_tree() {
  for (int i = 1; i <= n; i++) {
    int id = i + n - 1;
    T[id].vl = T[id].vr = a[i];
    T[id].len = 1;
    T[id].seg_l = T[id].seg_r = 1;
    T[id].value_l = T[id].value_r = T[id].value = 1;
    T[id].cd_l = T[id].cd_r = false;
    T[id].D = 0;
    T[id].emp = false;
  }
  for (int i = n - 1; i >= 1; i--) T[i] = combine(T[i << 1], T[i << 1 | 1]);
  h = sizeof(int) * 8 - __builtin_clz(n);
}
void process() {
  construct_segment_tree();
  int m, l, r, d;
  cin >> m;
  while (m--) {
    cin >> l >> r >> d;
    modify(l, r, d);
    cout << query(1, n).value << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  init();
  process();
}
