#include <bits/stdc++.h>
using namespace std;
int n, m, l1[4000010], r1[4000010], l2[4000010], r2[4000010], l3[4000010],
    r3[4000010], f3[4000010];
long long a[1000010], t[1000010];
void enter() {
  cin >> n;
  for (int i = 1, _key = n; i <= _key; ++i) cin >> a[i];
  a[0] = a[1];
}
void join(const int &s, const int &l, const int &r) {
  int sl = s << 1, sr = sl | 1, mid = (l + r) >> 1, zl = mid - l + 1,
      zr = r - mid;
  l3[s] = l3[sl];
  if (l3[s] == zl) l3[s] += l2[sr];
  l1[s] = l1[sl];
  if (l1[s] == zl) {
    l1[s] += l1[sr];
    l3[s] = max(l3[s], zl + max(l3[sr], l1[sr]));
  }
  l2[s] = l2[sl];
  if (l2[s] == zl) l2[s] += l2[sr];
  r3[s] = r3[sr];
  if (r3[s] == zr) r3[s] += r1[sl];
  r2[s] = r2[sr];
  if (r2[s] == zr) {
    r2[s] += r2[sl];
    r3[s] = max(r3[s], zr + max(r3[sl], r2[sl]));
  }
  r1[s] = r1[sr];
  if (r1[s] == zr) r1[s] += r1[sl];
  f3[s] = max(max(f3[sl], f3[sr]), max(r3[sl] + l2[sr], r1[sl] + l3[sr]));
}
void upbit(int i, const long long &x) {
  for (; i <= n; i += i & (-i)) t[i] += x;
}
long long getbit(int i) {
  long long g = 0;
  for (; i; i -= i & (-i)) g += t[i];
  return g;
}
void check(const int &s, const int &i) {
  if (i == 1) return;
  l1[s] = r1[s] = a[i] + getbit(i) > a[i - 1] + getbit(i - 1);
  l2[s] = r2[s] = a[i] + getbit(i) < a[i - 1] + getbit(i - 1);
  l3[s] = r3[s] = f3[s] = l1[s] | l2[s];
}
void init(const int &s, const int &l, const int &r) {
  if (l == r)
    check(s, l);
  else {
    int mid = (l + r) >> 1, sl = s << 1, sr = sl | 1;
    init(sl, l, mid);
    init(sr, mid + 1, r);
    join(s, l, r);
  }
}
void update(const int &s, const int &l, const int &r, const int &i) {
  if (i < l || r < i) return;
  if (l == r) {
    check(s, i);
    return;
  }
  int mid = (l + r) >> 1;
  update((s << 1), l, mid, i);
  update((s << 1) | 1, mid + 1, r, i);
  join(s, l, r);
}
void process() {
  init(1, 1, n);
  cin >> m;
  for (; m; m--) {
    int x, l, r;
    cin >> l >> r >> x;
    upbit(l, x);
    upbit(r + 1, -x);
    update(1, 1, n, l);
    update(1, 1, n, r + 1);
    cout << f3[1] + 1 << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  enter();
  process();
}
