#include <bits/stdc++.h>
using namespace std;
const int maxn = 300005;
int N, Q;
long long arr[maxn];
int pos_pref[4 * maxn], neg_pref[4 * maxn];
int pos_suf[4 * maxn], neg_suf[4 * maxn];
int pref[4 * maxn], suf[4 * maxn];
int mx[4 * maxn];
inline void pu(int l, int r, int rt) {
  int mid = (l + r) / 2;
  if (pos_pref[rt << 1] == mid - l + 1) {
    pos_pref[rt] = pos_pref[rt << 1] + pos_pref[rt << 1 | 1];
    if (max(neg_pref[rt << 1 | 1], pref[rt << 1 | 1]) == 0)
      pref[rt] = 0;
    else
      pref[rt] =
          pos_pref[rt << 1] + max(neg_pref[rt << 1 | 1], pref[rt << 1 | 1]);
  } else {
    pos_pref[rt] = pos_pref[rt << 1];
    if (pref[rt << 1] == mid - l + 1)
      pref[rt] = pref[rt << 1] + neg_pref[rt << 1 | 1];
    else
      pref[rt] = pref[rt << 1];
  }
  if (neg_suf[rt << 1 | 1] == r - mid) {
    neg_suf[rt] = neg_suf[rt << 1 | 1] + neg_suf[rt << 1];
    if (max(pos_suf[rt << 1], suf[rt << 1]) == 0)
      suf[rt] = 0;
    else
      suf[rt] = neg_suf[rt << 1 | 1] + max(pos_suf[rt << 1], suf[rt << 1]);
  } else {
    neg_suf[rt] = neg_suf[rt << 1 | 1];
    if (suf[rt << 1 | 1] == r - mid)
      suf[rt] = pos_suf[rt << 1] + suf[rt << 1 | 1];
    else
      suf[rt] = suf[rt << 1 | 1];
  }
  if (pos_suf[rt << 1 | 1] == r - mid)
    pos_suf[rt] = pos_suf[rt << 1] + pos_suf[rt << 1 | 1];
  else
    pos_suf[rt] = pos_suf[rt << 1 | 1];
  if (neg_pref[rt << 1] == mid - l + 1)
    neg_pref[rt] = neg_pref[rt << 1] + neg_pref[rt << 1 | 1];
  else
    neg_pref[rt] = neg_pref[rt << 1];
  mx[rt] = max({pos_pref[rt], pos_suf[rt], neg_pref[rt], neg_suf[rt], pref[rt],
                suf[rt]});
  mx[rt] = max({mx[rt], mx[rt << 1], mx[rt << 1 | 1]});
  mx[rt] =
      max({mx[rt], max(pos_suf[rt << 1], suf[rt << 1]) + neg_pref[rt << 1 | 1],
           pos_suf[rt << 1] + max(neg_pref[rt << 1 | 1], pref[rt << 1 | 1])});
  mx[rt] = max({mx[rt], pos_suf[rt << 1] + pos_pref[rt << 1 | 1],
                neg_suf[rt << 1] + neg_pref[rt << 1 | 1]});
}
void update(int pos, long long val, int rt = 1, int l = 2, int r = N) {
  if (l == r) {
    if (arr[pos] + val == 0)
      pos_pref[rt] = neg_pref[rt] = pos_suf[rt] = neg_suf[rt] = mx[rt] = 0;
    else if (arr[pos] + val > 0)
      pos_pref[rt] = pos_suf[rt] = mx[rt] = 1, neg_pref[rt] = neg_suf[rt] = 0;
    else
      pos_pref[rt] = pos_suf[rt] = 0, neg_pref[rt] = neg_suf[rt] = mx[rt] = 1;
    arr[pos] += val;
    return;
  }
  int mid = (l + r) / 2;
  if (pos <= mid)
    update(pos, val, rt << 1, l, mid);
  else
    update(pos, val, rt << 1 | 1, mid + 1, r);
  pu(l, r, rt);
}
void print() {
  for (int i = 2; i <= N; i++) cout << arr[i] << " ";
  cout << endl;
}
void printTree(int rt = 1, int l = 2, int r = N) {
  cout << l << " " << r << ": " << mx[rt] << endl;
  if (l == r) return;
  int mid = (l + r) / 2;
  printTree(rt << 1, l, mid);
  printTree(rt << 1 | 1, mid + 1, r);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> arr[i];
  for (int i = N; i > 1; i--) update(i, -arr[i - 1]);
  cin >> Q;
  while (Q--) {
    int l, r, v;
    cin >> l >> r >> v;
    if (l != 1) update(l, v);
    if (r != N) update(r + 1, -v);
    cout << mx[1] + 1 << '\n';
  }
}
