#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
const int INF = 0x3f3f3f3f;
struct Tree {
  int l_dec, r_inc, l_ans, r_ans, ans, len;
  long long l_val, r_val, lazy;
} t[N << 2];
long long a[N];
int main() {
  function<void(int)> push_up = [&](int rt) {
    t[rt].l_val = t[(rt << 1)].l_val;
    t[rt].r_val = t[(rt << 1 | 1)].r_val;
    t[rt].l_dec = t[(rt << 1)].l_dec;
    t[rt].r_inc = t[(rt << 1 | 1)].r_inc;
    if (t[(rt << 1)].r_val > t[(rt << 1 | 1)].l_val &&
        t[rt].l_dec == t[(rt << 1)].len)
      t[rt].l_dec += t[(rt << 1 | 1)].l_dec;
    if (t[(rt << 1)].r_val < t[(rt << 1 | 1)].l_val &&
        t[rt].r_inc == t[(rt << 1 | 1)].len)
      t[rt].r_inc += t[(rt << 1)].r_inc;
    t[rt].l_ans = t[(rt << 1)].l_ans;
    t[rt].r_ans = t[(rt << 1 | 1)].r_ans;
    if (t[(rt << 1)].r_val > t[(rt << 1 | 1)].l_val &&
        t[rt].l_ans == t[(rt << 1)].len)
      t[rt].l_ans += t[(rt << 1 | 1)].l_dec;
    if (t[(rt << 1)].r_val < t[(rt << 1 | 1)].l_val &&
        t[(rt << 1)].r_inc == t[(rt << 1)].len)
      t[rt].l_ans =
          max(t[rt].l_ans, t[(rt << 1)].r_inc + t[(rt << 1 | 1)].l_ans);
    if (t[(rt << 1)].r_val < t[(rt << 1 | 1)].l_val &&
        t[rt].r_ans == t[(rt << 1 | 1)].len)
      t[rt].r_ans += t[(rt << 1)].r_inc;
    if (t[(rt << 1)].r_val > t[(rt << 1 | 1)].l_val &&
        t[(rt << 1 | 1)].l_dec == t[(rt << 1 | 1)].len)
      t[rt].r_ans =
          max(t[rt].r_ans, t[(rt << 1)].r_ans + t[(rt << 1 | 1)].l_dec);
    t[rt].ans = max(t[(rt << 1)].ans, t[(rt << 1 | 1)].ans);
    t[rt].ans = max(t[rt].ans, t[rt].r_ans);
    t[rt].ans = max(t[rt].ans, t[rt].l_ans);
    t[rt].ans = max(t[rt].ans, t[rt].l_dec);
    t[rt].ans = max(t[rt].ans, t[rt].r_inc);
    if (t[(rt << 1)].r_val > t[(rt << 1 | 1)].l_val)
      t[rt].ans = max(t[rt].ans, t[(rt << 1)].r_ans + t[(rt << 1 | 1)].l_dec);
    if (t[(rt << 1)].r_val < t[(rt << 1 | 1)].l_val)
      t[rt].ans = max(t[rt].ans, t[(rt << 1 | 1)].l_ans + t[(rt << 1)].r_inc);
  };
  function<void(int)> push_down = [&](int rt) {
    if (t[rt].lazy) {
      t[(rt << 1)].l_val += t[rt].lazy;
      t[(rt << 1)].r_val += t[rt].lazy;
      t[(rt << 1 | 1)].l_val += t[rt].lazy;
      t[(rt << 1 | 1)].r_val += t[rt].lazy;
      t[(rt << 1)].lazy += t[rt].lazy;
      t[(rt << 1 | 1)].lazy += t[rt].lazy;
      t[rt].lazy = 0;
    }
  };
  function<void(int, int, int)> build = [&](int l, int r, int rt) {
    t[rt].len = r - l + 1;
    if (l == r) {
      t[rt].l_dec = t[rt].r_inc = t[rt].l_ans = t[rt].r_ans = t[rt].ans = 1;
      t[rt].l_val = t[rt].r_val = a[l];
      return;
    }
    int mid = l + r >> 1;
    build(l, mid, (rt << 1));
    build(mid + 1, r, (rt << 1 | 1));
    push_up(rt);
  };
  function<void(int, int, int, int, int, int)> update =
      [&](int l, int r, int L, int R, int val, int rt) {
        if (L <= l && r <= R) {
          t[rt].l_val += val;
          t[rt].r_val += val;
          t[rt].lazy += val;
          return;
        }
        int mid = l + r >> 1;
        push_down(rt);
        if (L <= mid) update(l, mid, L, R, val, (rt << 1));
        if (mid < R) update(mid + 1, r, L, R, val, (rt << 1 | 1));
        push_up(rt);
      };
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  build(1, n, 1);
  int q;
  scanf("%d", &q);
  while (q--) {
    int l, r, val;
    scanf("%d %d %d", &l, &r, &val);
    update(1, n, l, r, val, 1);
    printf("%d\n", t[1].ans);
  }
  return 0;
}
