#include <bits/stdc++.h>
using namespace std;
struct treeLen {
  int n;
  vector<int> abest;
  vector<int> al;
  vector<int> ar;
  treeLen() { n = 0; }
  treeLen(vector<int> vec) {
    n = 1;
    while (n < vec.size()) {
      n *= 2;
    }
    abest.resize(2 * n);
    al.resize(2 * n);
    ar.resize(2 * n);
    for (int i = n; i < 2 * n; i++) {
      if (i < vec.size() + n) {
        abest[i] = vec[i - n] % 2;
        al[i] = vec[i - n] % 2;
        ar[i] = vec[i - n] % 2;
      } else {
        abest[i] = 0;
        al[i] = 0;
        ar[i] = 0;
      }
    }
    int L = 1;
    int R = 2;
    for (int i = n - 1; i > 0; i--) {
      refresh(i, L, R);
      if (n / R == i) {
        R *= 2;
      }
    }
  }
  void refresh(int v, int L, int R) {
    int siz = R - L + 1;
    if (siz == 1) {
      return;
    }
    abest[v] =
        max(ar[2 * v] + al[2 * v + 1], max(abest[2 * v], abest[2 * v + 1]));
    if (al[2 * v] == siz / 2) {
      al[v] = abest[v];
    } else {
      al[v] = al[2 * v];
    }
    if (ar[2 * v + 1] == siz / 2) {
      ar[v] = abest[v];
    } else {
      ar[v] = ar[2 * v + 1];
    }
  }
  void set(int x, int val) { set(1, 0, n - 1, x, val); }
  void set(int v, int L, int R, int x, int val) {
    if (L == R) {
      abest[v] = val;
      al[v] = val;
      ar[v] = val;
    } else {
      int mid = (L + R) / 2;
      if (x <= mid) {
        set(2 * v, L, mid, x, val);
      } else {
        set(2 * v + 1, mid + 1, R, x, val);
      }
      refresh(v, L, R);
    }
  }
  int get() { return abest[1]; }
  void print() {
    int step2 = 2;
    for (int i = 1; i < 2 * n; i++) {
      if (i == step2) {
        step2 *= 2;
        cout << "\n";
      }
      cout << "(" << abest[i] << ", " << al[i] << ", " << ar[i] << ") ";
    }
  }
};
treeLen tl;
vector<int> a;
vector<long long> da;
vector<int> b;
int n;
void refresh(int i) {
  if (i == 0 || i == n - 1) {
    return;
  }
  if (da[i - 1] != 0 && da[i] != 0 && !(da[i - 1] < 0 && da[i] > 0)) {
    tl.set(i, 1);
  } else {
    tl.set(i, 0);
  }
}
int main() {
  scanf("%d", &n);
  a.resize(n);
  da.resize(n - 1);
  b.resize(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  int k0 = 0;
  for (int i = 0; i < n - 1; i++) {
    da[i] = a[i + 1] - a[i];
    if (da[i] == 0) {
      k0++;
    }
  }
  for (int i = 1; i < n - 1; i++) {
    if (da[i - 1] != 0 && da[i] != 0 && !(da[i - 1] < 0 && da[i] > 0)) {
      b[i] = 1;
    } else {
      b[i] = 0;
    }
  }
  b[0] = 0;
  b[n - 1] = 0;
  tl = treeLen(b);
  int m;
  scanf("%d", &m);
  for (int trash = 0; trash < m; trash++) {
    int l, r, val;
    scanf("%d %d %d", &l, &r, &val);
    l--;
    r--;
    if (l != 0) {
      if (da[l - 1] == 0) {
        k0--;
      } else if (da[l - 1] + val == 0) {
        k0++;
      }
      da[l - 1] += val;
      refresh(l - 1);
      refresh(l);
    }
    if (r != n - 1) {
      if (da[r] == 0) {
        k0--;
      } else if (da[r] - val == 0) {
        k0++;
      }
      da[r] -= val;
      refresh(r);
      refresh(r + 1);
    }
    int out = tl.get();
    if (k0 == n - 1) {
      out++;
    } else {
      out += 2;
    }
    cout << out << "\n";
  }
}
