#include <bits/stdc++.h>
using namespace std;
bool dbg = 0;
clock_t start_time = clock();
void bad(string mes = "Impossible") {
  cout << mes;
  exit(0);
}
template <typename T>
string bin(T x, int st = 2) {
  string ans = "";
  while (x > 0) {
    ans += char('0' + x % st);
    x /= st;
  }
  reverse(ans.begin(), ans.end());
  return ans.empty() ? "0" : ans;
}
template <typename T>
T input() {
  T ans = 0, m = 1;
  char c = ' ';
  while (!((c >= '0' && c <= '9') || c == '-')) {
    c = getchar();
  }
  if (c == '-') m = -1, c = getchar();
  while (c >= '0' && c <= '9') {
    ans = ans * 10 + (c - '0'), c = getchar();
  }
  return ans * m;
}
template <typename T>
void read(T& a) {
  a = input<T>();
}
template <typename T>
void read(T& a, T& b) {
  read(a), read(b);
}
template <typename T>
void read(T& a, T& b, T& c) {
  read(a, b), read(c);
}
template <typename T>
void read(T& a, T& b, T& c, T& d) {
  read(a, b), read(c, d);
}
void reads(string& second) {
  string ans = "";
  char c = '\n';
  while (c == '\n' || c == ' ') c = getchar();
  while (c != '\n' && c != ' ' && c) ans += c, c = getchar();
  second = ans;
}
const int inf = 1e9;
const long double eps = 1e-12;
const int maxn = 3e5 + 10, base = 1e9 + 7;
const long long llinf = 4e18 + 5;
template <typename T>
T binpow(T n, T second) {
  if (second <= 0) return 1LL;
  if (second % 2 == 0) {
    T b = binpow(n, second / 2);
    return (1LL * b * b) % base;
  } else {
    return (1LL * binpow(n, second - 1) * n) % base;
  }
}
struct node {
  int l_seg, r_seg, mx;
};
node tree[8 * maxn];
long long a[maxn];
void merge(int v, int tl, int tr) {
  int tm = (tl + tr) >> 1;
  if (a[tm] == 0 || a[tm + 1] == 0 || (a[tm] < 0 && a[tm + 1] > 0)) {
    tree[v].l_seg = tree[v << 1].l_seg;
    tree[v].r_seg = tree[v << 1 | 1].r_seg;
    tree[v].mx = max(tree[v << 1].mx, tree[v << 1 | 1].mx);
    return;
  }
  tree[v].mx = max(max(tree[v << 1].mx, tree[v << 1 | 1].mx),
                   tree[v << 1].r_seg + tree[v << 1 | 1].l_seg);
  tree[v].l_seg = tree[v << 1].l_seg;
  if (tree[v << 1].mx == tm - tl + 1) {
    tree[v].l_seg += tree[v << 1 | 1].l_seg;
  }
  tree[v].r_seg = tree[v << 1 | 1].r_seg;
  if (tree[v << 1 | 1].mx == tr - tm) {
    tree[v].r_seg += tree[v << 1].r_seg;
  }
}
void build(int v, int tl, int tr) {
  if (tl == tr) {
    int cur = a[tl] != 0;
    tree[v].l_seg = tree[v].r_seg = tree[v].mx = cur;
    return;
  }
  int tm = (tl + tr) >> 1;
  build(v << 1, tl, tm);
  build(v << 1 | 1, tm + 1, tr);
  merge(v, tl, tr);
}
void upd(int v, int tl, int tr, int pos, int val) {
  if (tl == tr) {
    a[tl] += val;
    int cur = a[tl] != 0;
    tree[v].l_seg = tree[v].r_seg = tree[v].mx = cur;
    return;
  }
  int tm = (tl + tr) >> 1;
  if (pos <= tm)
    upd(v << 1, tl, tm, pos, val);
  else
    upd(v << 1 | 1, tm + 1, tr, pos, val);
  merge(v, tl, tr);
}
void print(int v, int tl, int tr) {
  cout << v << ' ' << tl << ' ' << tr << '\n';
  cout << tree[v].l_seg << ' ' << tree[v].r_seg << ' ' << tree[v].mx << '\n';
  cout << '\n';
  if (tl == tr) return;
  print(v << 1, tl, (tl + tr) >> 1);
  print(v << 1 | 1, ((tl + tr) >> 1) + 1, tr);
}
int main() {
  int n;
  read(n);
  for (int i = 0; i < n; i++) {
    read(a[i]);
  }
  for (int i = 0; i + 1 < n; i++) {
    a[i] = a[i + 1] - a[i];
  }
  if (n != 1) {
    build(1, 0, n - 2);
  }
  int m;
  read(m);
  for (int i = 0; i < m; i++) {
    int l, r, d;
    read(l, r, d);
    if (dbg && i <= 18) {
      cout << l << ' ' << r << ' ' << d << '\n';
    }
    if (n == 1) {
      puts("1");
    } else {
      if (l != 1) upd(1, 0, n - 2, l - 2, d);
      if (r != n) upd(1, 0, n - 2, r - 1, -d);
      cout << tree[1].mx + 1 << '\n';
    }
  }
  return 0;
}
