#include <bits/stdc++.h>
using namespace std;
const int N = 300005;
priority_queue<int> heap, del;
int n, m;
long long a[N];
inline int idx(long long x) {
  if (x == 0) return 0;
  return x < 0 ? 2 : 1;
}
int num[N * 4][3];
void build(int i, int l, int r) {
  if (l == r) {
    num[i][idx(a[l])] = 1;
    return;
  }
  int mid = (l + r) >> 1;
  build(i << 1, l, mid);
  build(i << 1 | 1, mid + 1, r);
  num[i][0] = num[i << 1][0] + num[i << 1 | 1][0];
  num[i][1] = num[i << 1][1] + num[i << 1 | 1][1];
  num[i][2] = num[i << 1][2] + num[i << 1 | 1][2];
}
void updata(int i, int l, int r, int pos) {
  if (l == r) {
    num[i][0] = num[i][1] = num[i][2] = 0;
    num[i][idx(a[l])] = 1;
    return;
  }
  int mid = (l + r) >> 1;
  if (pos <= mid)
    updata(i << 1, l, mid, pos);
  else
    updata(i << 1 | 1, mid + 1, r, pos);
  num[i][0] = num[i << 1][0] + num[i << 1 | 1][0];
  num[i][1] = num[i << 1][1] + num[i << 1 | 1][1];
  num[i][2] = num[i << 1][2] + num[i << 1 | 1][2];
}
bool findl(int i, int l, int r, int pos, int ty, int &left) {
  if (pos <= 1 || pos > n) return false;
  if (num[i][ty] == 0) return false;
  int mid = (l + r) >> 1;
  if (r > pos) {
    if (pos <= mid) return findl(i << 1, l, mid, pos, ty, left);
    if (findl(i << 1 | 1, mid + 1, r, pos, ty, left))
      return findl(i << 1, l, mid, mid, ty, left);
    return false;
  }
  if (r - l + 1 == num[i][ty]) {
    left = l;
    return true;
  }
  if (l == r) return false;
  if (findl(i << 1 | 1, mid + 1, r, r, ty, left))
    return findl(i << 1, l, mid, mid, ty, left);
  return false;
}
bool findr(int i, int l, int r, int pos, int ty, int &right) {
  if (pos <= 1 || pos > n) return false;
  if (num[i][ty] == 0) return false;
  int mid = (l + r) >> 1;
  if (l < pos) {
    if (mid < pos) return findr(i << 1 | 1, mid + 1, r, pos, ty, right);
    if (findr(i << 1, l, mid, pos, ty, right))
      return findr(i << 1 | 1, mid + 1, r, mid + 1, ty, right);
    return false;
  }
  if (r - l + 1 == num[i][ty]) {
    right = r;
    return true;
  }
  if (l == r) return false;
  if (findr(i << 1, l, mid, l, ty, right))
    return findr(i << 1 | 1, mid + 1, r, mid + 1, ty, right);
  return false;
}
int work(int pos, int &l) {
  int r;
  if (a[pos] == 0) {
    l = pos;
    return 0;
  }
  if (a[pos] < 0) {
    l = r = pos;
    if (a[pos - 1] < 0) findl(1, 2, n, pos, 2, l);
    if (a[l - 1] > 0) findl(1, 2, n, l - 1, 1, l);
    if (a[pos + 1] < 0) findr(1, 2, n, pos, 2, r);
  } else {
    l = r = pos;
    if (a[pos - 1] > 0) findl(1, 2, n, pos, 1, l);
    if (a[pos + 1] > 0) findr(1, 2, n, pos, 1, r);
    if (a[r + 1] < 0) findr(1, 2, n, r + 1, 2, r);
  }
  return r - l + 1;
}
void init() {
  a[1] = 0;
  build(1, 2, n);
  for (int x, i = 1; i <= n + 1; i++)
    if (a[i] == 0 || a[i + 1] == 0 || (a[i] < 0 && a[i + 1] > 0))
      heap.push(work(i, x));
}
void add(int pos, int x) {
  if (pos <= 1 || pos > n) return;
  int tmp = idx(a[pos]);
  if (tmp == idx(a[pos] + x)) {
    a[pos] += x;
    return;
  }
  int id1, id2, id3, t1, t2, t3;
  del.push(t2 = work(pos, id2));
  t1 = work(pos - 1, id1);
  t3 = work(pos + 1, id3);
  if (id1 != id2) del.push(t1);
  if (id3 != id2) del.push(t3);
  a[pos] += x;
  updata(1, 2, n, pos);
  heap.push(work(pos, id2));
  t1 = work(pos - 1, id1);
  t3 = work(pos + 1, id3);
  if (id1 != id2) heap.push(t1);
  if (id3 != id2) heap.push(t3);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  if (n == 1) {
    scanf("%d", &m);
    while (m--) printf("1");
    return 0;
  }
  for (int i = n; i >= 2; i--) a[i] -= a[i - 1];
  init();
  scanf("%d", &m);
  int l, r, x;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d%d", &l, &r, &x);
    add(l, x);
    add(r + 1, -x);
    while (!del.empty() && heap.top() == del.top()) heap.pop(), del.pop();
    printf("%d\n", heap.top() + 1);
  }
  return 0;
}
