#include <bits/stdc++.h>
using namespace std;
const int N = 3e5;
int A[N], n;
struct Node {
  int L, R, ans, l, r, pl, pr;
  long long num1, num2;
  Node() { ans = -1; }
  Node(int a) {
    L = R = l = r = pl = pr = a;
    ans = 1;
    num1 = A[a];
    num2 = A[a];
  }
} T[4 * N];
long long flag[4 * N];
long long num1, num2;
struct BIT {
  long long bit[N + 2];
  void update(int pos, long long val) {
    while (pos <= N) {
      bit[pos] += val;
      pos += (pos & -pos);
    }
    return;
  }
  long long query(int pos) {
    long long sum = 0;
    while (pos) {
      sum += bit[pos];
      pos -= (pos & -pos);
    }
    return sum;
  }
} b1, b2;
Node operator+(Node a, Node b) {
  if (a.ans == -1) return b;
  if (b.ans == -1) return a;
  Node c;
  c.L = a.L;
  c.R = b.R;
  c.num1 = a.num1;
  c.num2 = b.num2;
  num1 = a.num2;
  num2 = b.num1;
  c.ans = max(a.ans, b.ans);
  c.l = a.l;
  c.r = b.r;
  c.pl = a.pl;
  c.pr = b.pr;
  if (num1 != num2) {
    if (num1 > num2) {
      if (a.l == a.R) c.l = b.l;
      if (b.l == b.R) {
        c.pr = min(c.pr, a.pr);
      }
      if (a.pl == a.R) c.pl = b.l;
      c.ans = max(c.ans, b.l - a.pr + 1);
    } else {
      if (b.r == b.L) c.r = a.r;
      if (b.pr == b.L) c.pr = a.r;
      if (a.r == a.L) {
        c.pl = max(c.pl, b.pl);
      }
      c.ans = max(c.ans, b.pl - a.r + 1);
    }
    c.ans = max(c.ans, b.l - a.r + 1);
  }
  return c;
}
void push(int node, int a, int b) {
  if (flag[node] == 0) return;
  T[node].num1 += flag[node];
  T[node].num2 += flag[node];
  if (a != b) {
    flag[node * 2 + 1] += flag[node];
    flag[node * 2 + 2] += flag[node];
  }
  flag[node] = 0;
}
void update(int node, int a, int b, int lo, int hi, int val) {
  push(node, a, b);
  if (hi < a || b < lo) return;
  if (lo <= a && b <= hi) {
    flag[node] += val;
    push(node, a, b);
    return;
  }
  int mi = (a + b) >> 1;
  update(node * 2 + 1, a, mi, lo, hi, val);
  update(node * 2 + 2, mi + 1, b, lo, hi, val);
  T[node] = T[(node << 1) + 1] + T[(node << 1) + 2];
}
void build(int node, int a, int b) {
  if (a == b) {
    T[node] = Node(a);
    return;
  }
  int mi = (a + b) >> 1;
  build((node << 1) + 1, a, mi);
  build((node << 1) + 2, mi + 1, b);
  T[node] = T[(node << 1) + 1] + T[(node << 1) + 2];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  build(0, 0, n - 1);
  int m;
  cin >> m;
  int x, y, val;
  for (int i = 0; i < m; i++) {
    cin >> x >> y >> val;
    update(0, 0, n - 1, x - 1, y - 1, val);
    printf("%d\n", T[0].ans);
  }
}
