#include <bits/stdc++.h>
using namespace std;
long long n, m, ans, a[2000010], a0[2000010];
struct Node {
  long long MaxL, MaxR, Max;
};
Node tree[2000010];
long long Sign(long long x) {
  if (x > 0) {
    return 1;
  }
  if (x == 0) {
    return 0;
  }
  return -1;
}
void Merge(long long idx, long long l, long long r) {
  if (l == r) {
    return;
  }
  long long mid = (l + r) / 2;
  tree[idx].Max = max(tree[idx * 2 + 1].Max, tree[idx * 2 + 2].Max);
  if (!a[mid] or !a[mid + 1] or Sign(a[mid]) < Sign(a[mid + 1])) {
    tree[idx].MaxL = tree[idx * 2 + 1].MaxL;
    tree[idx].MaxR = tree[idx * 2 + 2].MaxR;
  } else {
    tree[idx].Max =
        max(tree[idx].Max, tree[idx * 2 + 1].MaxR + tree[idx * 2 + 2].MaxL);
    if (tree[idx * 2 + 1].MaxL == mid - l + 1) {
      tree[idx].MaxL = tree[idx * 2 + 1].MaxL + tree[idx * 2 + 2].MaxL;
    } else {
      tree[idx].MaxL = tree[idx * 2 + 1].MaxL;
    }
    if (tree[idx * 2 + 2].MaxR == r - mid) {
      tree[idx].MaxR = tree[idx * 2 + 2].MaxR + tree[idx * 2 + 1].MaxR;
    } else {
      tree[idx].MaxR = tree[idx * 2 + 2].MaxR;
    }
  }
}
void Init(long long idx, long long l, long long r) {
  if (l == r) {
    if (a[l]) {
      tree[idx] = {1, 1, 1};
    } else {
      tree[idx] = {0, 0, 0};
    }
    return;
  }
  long long mid = (l + r) / 2;
  Init(idx * 2 + 1, l, mid);
  Init(idx * 2 + 2, mid + 1, r);
  Merge(idx, l, r);
}
void Update(long long idx, long long x, long long val, long long l,
            long long r) {
  if (l == r) {
    a[l] += val;
    if (a[l]) {
      tree[idx] = {1, 1, 1};
    } else {
      tree[idx] = {0, 0, 0};
    }
    return;
  }
  long long mid = (l + r) / 2;
  if (x <= mid) {
    Update(idx * 2 + 1, x, val, l, mid);
  } else {
    Update(idx * 2 + 2, x, val, mid + 1, r);
  }
  Merge(idx, l, r);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cin >> n;
  for (long long i = 0; i < n; ++i) {
    cin >> a0[i];
  }
  for (long long i = 0; i < n - 1; ++i) {
    a[i] = a0[i + 1] - a0[i];
  }
  if (n > 1) {
    Init(0, 0, n - 2);
  }
  cin >> m;
  for (long long i = 0; i < m; ++i) {
    long long l, r, x;
    cin >> l >> r >> x;
    if (n == 1) {
      cout << "1\n";
      continue;
    }
    if (l >= 2) {
      Update(0, l - 2, x, 0, n - 2);
    }
    if (r < n) {
      Update(0, r - 1, -x, 0, n - 2);
    }
    cout << tree[0].Max + 1 << '\n';
  }
}
