#include <bits/stdc++.h>
using namespace std;
const int N = 300001;
struct segment {
  long long tree[4 * N], lazy[4 * N];
  int n;
  void resize(int _n) { n = _n; }
  void shift(int l, int r, int node) {
    if (!lazy[node]) return;
    tree[node] += (long long)(r - l + 1) * lazy[node];
    if (l != r) {
      lazy[node << 1] += lazy[node];
      lazy[node << 1 | 1] += lazy[node];
    }
    lazy[node] = 0;
  }
  void update(int l, int r, int node, int left, int right, long long val) {
    if (l > r) return;
    shift(l, r, node);
    if (l > right || r < left) return;
    if (l >= left && r <= right) {
      tree[node] += (long long)(r - l + 1) * val;
      if (l != r) {
        lazy[node << 1] += val;
        lazy[node << 1 | 1] += val;
      }
      return;
    }
    int mid = (l + r) >> 1;
    update(l, mid, node << 1, left, right, val);
    update(mid + 1, r, node << 1 | 1, left, right, val);
    tree[node] = tree[node << 1] + tree[node << 1 | 1];
  }
  long long query(int l, int r, int node, int left, int right) {
    if (l > r) return 0;
    shift(l, r, node);
    if (l > right || r < left) return 0;
    if (l >= left && r <= right) return tree[node];
    int mid = (l + r) >> 1;
    return query(l, mid, node << 1, left, right) +
           query(mid + 1, r, node << 1 | 1, left, right);
  }
};
int n, q;
segment tree;
vector<int> a;
set<pair<int, int> > s;
multiset<int> sizes;
int sign(int idx) {
  if (idx == 0) return 0;
  long long x = tree.query(0, n - 1, 1, idx - 1, idx - 1);
  long long y = tree.query(0, n - 1, 1, idx, idx);
  if (x < y) return 1;
  if (x > y) return -1;
  return 0;
}
bool bad(int idx) {
  if (idx == 0) return 1;
  if (a[idx] == 0 || a[idx - 1] == 0) return 1;
  if (a[idx - 1] == -1 && a[idx] == 1) return 1;
  return 0;
}
void erase(pair<int, int> x) {
  sizes.erase(sizes.find(x.second - x.first + 1));
  s.erase(make_pair(x.first, x.second));
}
void insert(pair<int, int> x) {
  sizes.insert(x.second - x.first + 1);
  s.insert(make_pair(x.first, x.second));
}
void merge(int x) {
  auto g = *(--s.upper_bound(make_pair(x - 1, 1e9)));
  auto h = *(--s.upper_bound(make_pair(x, 1e9)));
  if (g == h) return;
  erase(g);
  erase(h);
  insert(make_pair(g.first, h.second));
}
void split(int x) {
  auto g = *(--s.upper_bound(make_pair(x, 1e9)));
  if (g.first == x) return;
  erase(g);
  insert(make_pair(g.first, x - 1));
  insert(make_pair(x, g.second));
}
void upd(int idx) {
  if (idx == 0 || idx == n) return;
  a[idx] = sign(idx);
  if (bad(idx))
    split(idx);
  else
    merge(idx);
  if (idx + 1 < n) {
    if (bad(idx + 1))
      split(idx + 1);
    else
      merge(idx + 1);
  }
}
int main() {
  scanf("%d", &n);
  tree.resize(n + 1);
  for (int i = 0, x; i < n && scanf("%d", &x); i++)
    tree.update(0, n - 1, 1, i, i, x);
  for (int i = 0; i < n; i++) a.push_back(sign(i));
  for (int i = 0; i < n; i++) insert(make_pair(i, i));
  for (int i = 1; i < n; i++)
    if (!bad(i)) merge(i);
  scanf("%d", &q);
  while (q--) {
    int l, r, d;
    scanf("%d %d %d", &l, &r, &d);
    l--;
    r--;
    if (n == 1) {
      puts("1");
      continue;
    }
    tree.update(0, n - 1, 1, l, r, d);
    upd(l);
    upd(r + 1);
    printf("%d\n", *sizes.rbegin() + 1);
  }
}
