#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int inf = 50000000;
const int maxn = 300010;
struct node {
  int ans, sufans, prefans, prefInc, prefDec, sufInc, sufDec;
  long long last, first, lazy;
};
int n, A[maxn];
node st[maxn * 5];
void merge(int l, int r, int second, int e, int m, int k) {
  st[k].first = st[l].first;
  st[k].last = st[r].last;
  if (st[l].prefInc == m - second + 1 && st[r].first > st[l].last) {
    st[k].prefInc = st[l].prefInc + st[r].prefInc;
  } else {
    st[k].prefInc = st[l].prefInc;
  }
  if (st[l].prefDec == m - second + 1 && st[r].first < st[l].last) {
    st[k].prefDec = st[l].prefDec + st[r].prefDec;
  } else {
    st[k].prefDec = st[l].prefDec;
  }
  if (st[r].sufInc == e - m && st[l].last > st[r].first) {
    st[k].sufInc = st[r].sufInc + st[l].sufInc;
  } else {
    st[k].sufInc = st[r].sufInc;
  }
  if (st[r].sufDec == e - m && st[l].last < st[r].first) {
    st[k].sufDec = st[r].sufDec + st[l].sufDec;
  } else {
    st[k].sufDec = st[r].sufDec;
  }
  if (st[l].prefans == m - second + 1) {
    if (st[l].prefInc == m - second + 1) {
      if (st[r].first > st[l].last) {
        st[k].prefans = st[l].prefans + st[r].prefans;
      } else if (st[r].first < st[l].last) {
        st[k].prefans = st[l].prefans + st[r].prefDec;
      } else {
        st[k].prefans = st[l].prefans;
      }
    } else {
      if (st[r].first < st[l].last) {
        st[k].prefans = st[l].prefans + st[r].prefDec;
      } else {
        st[k].prefans = st[l].prefans;
      }
    }
  } else {
    st[k].prefans = st[l].prefans;
  }
  if (st[r].sufans == e - m) {
    if (st[r].sufInc == e - m) {
      if (st[r].first < st[l].last) {
        st[k].sufans = st[r].sufans + st[l].sufans;
      } else if (st[r].first > st[l].last) {
        st[k].sufans = st[r].sufans + st[l].sufDec;
      } else {
        st[k].sufans = st[r].sufans;
      }
    } else {
      if (st[r].first > st[l].last) {
        st[k].sufans = st[r].sufans + st[l].sufDec;
      } else {
        st[k].sufans = st[r].sufans;
      }
    }
  } else {
    st[k].sufans = st[r].sufans;
  }
  st[k].ans = max(st[l].ans, st[r].ans);
  if (st[r].first < st[l].last) {
    st[k].ans = max(st[k].ans, st[l].sufans + st[r].prefDec);
  }
  if (st[r].first > st[l].last) {
    st[k].ans = max(st[k].ans, st[l].sufDec + st[r].prefans);
  }
}
void init(int second, int e, int k) {
  if (second == e) {
    st[k].ans = st[k].prefans = st[k].sufans = 1;
    st[k].prefInc = st[k].prefDec = st[k].sufInc = st[k].sufDec = 1;
    st[k].first = st[k].last = A[second];
    st[k].lazy = 0;
    return;
  }
  int mid = (second + e) >> 1;
  int lc = (k << 1) + 1;
  int rc = lc + 1;
  init(second, mid, lc);
  init(mid + 1, e, rc);
  merge(lc, rc, second, e, mid, k);
}
void push(int second, int e, int k) {
  if (st[k].lazy) {
    if (second != e) {
      int lc = (k << 1) + 1;
      int rc = lc + 1;
      st[lc].first += st[k].lazy;
      st[rc].first += st[k].lazy;
      st[lc].last += st[k].lazy;
      st[rc].last += st[k].lazy;
      st[lc].lazy += st[k].lazy;
      st[rc].lazy += st[k].lazy;
    }
    st[k].lazy = 0;
  }
}
void update(int second, int e, int qs, int qe, int v, int k) {
  push(second, e, k);
  if (second > e || second > qe || qs > e || qs > qe) {
    return;
  }
  int mid = (second + e) >> 1;
  int lc = (k << 1) + 1;
  int rc = lc + 1;
  if (second >= qs && qe >= e) {
    st[k].first += v;
    st[k].last += v;
    if (second != e) {
      st[lc].first += v;
      st[rc].first += v;
      st[lc].last += v;
      st[rc].last += v;
      st[lc].lazy += v;
      st[rc].lazy += v;
    }
    return;
  }
  update(second, mid, qs, qe, v, lc);
  update(mid + 1, e, qs, qe, v, rc);
  merge(lc, rc, second, e, mid, k);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
  }
  init(1, n, 0);
  int m;
  scanf("%d", &m);
  while (m--) {
    int l, r, d;
    scanf("%d %d %d", &l, &r, &d);
    update(1, n, l, r, d, 0);
    printf("%d\n", st[0].ans);
  }
  return 0;
}
