#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
void sync_stdio() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
}
struct Sync_stdio {
  Sync_stdio() {
    cin.tie(NULL);
    ios_base::sync_with_stdio(false);
  }
} _sync_stdio;
struct FAIL {
  FAIL() {
    cout << "CHANGE!!!"
         << "\n";
  }
};
inline int sign(long long x) { return x > 0 ? 1 : x == 0 ? 0 : -1; }
void recalc(multiset<int> &best, set<int> &s, int pos, vector<long long> &a,
            int add) {
  pos += 5;
  if (sign(a[pos]) == sign(a[pos] + add)) {
    a[pos] += add;
    return;
  }
  auto it0 = s.lower_bound(pos);
  auto start = prev(it0, 4);
  auto end = next(it0, 4);
  for (auto it = start, it2 = next(it), it3 = next(it2); it3 != end;
       ++it, ++it2, ++it3) {
    if (a[*it] > 0 && a[*it2] < 0) {
      best.erase(best.find(*it3 - *it));
    }
  }
  for (auto it = start, it2 = next(it); it2 != end; ++it, ++it2) {
    if (a[*it] != 0) {
      best.erase(best.find(*it2 - *it));
    }
  }
  a[pos] += add;
  for (int i = (pos); i < (pos + 2); ++i) {
    if (i == 0 || sign(a[i]) * sign(a[i - 1]) != 1) {
      s.insert(i);
    } else {
      s.erase(i);
    }
  }
  for (auto it = start, it2 = next(it), it3 = next(it2); it3 != end;
       ++it, ++it2, ++it3) {
    if (a[*it] > 0 && a[*it2] < 0) {
      best.insert(*it3 - *it);
    }
  }
  for (auto it = start, it2 = next(it); it2 != end; ++it, ++it2) {
    if (a[*it] != 0) {
      best.insert(*it2 - *it);
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int __i = 0; __i < (n); ++__i) cin >> a[__i];
  ;
  for (int i = (0); i < (n - 1); ++i) {
    a[i] = a[i + 1] - a[i];
  }
  a.pop_back();
  for (int i = (0); i < (5); ++i) {
    a.insert(a.begin(), 0);
  }
  for (int i = (0); i < (5); ++i) {
    a.push_back(0);
  }
  int m;
  cin >> m;
  set<int> start;
  for (int i = (0); i < (n - 1 + 2 * 5); ++i) {
    if (i == 0 || sign(a[i]) * sign(a[i - 1]) != 1) {
      start.insert(i);
    }
  }
  multiset<int> best;
  for (auto it = start.begin(), it2 = next(it), it3 = next(it2);
       it3 != start.end(); ++it, ++it2, ++it3) {
    if (a[*it] > 0 && a[*it2] < 0) {
      best.insert(*it3 - *it);
    }
  }
  for (auto it = start.begin(), it2 = next(it); it2 != start.end();
       ++it, ++it2) {
    if (a[*it] != 0) {
      best.insert(*it2 - *it);
    }
  }
  vector<int> res(m);
  for (int j = (0); j < (m); ++j) {
    int x, y, d;
    cin >> x >> y >> d;
    x -= 2;
    --y;
    if (0 <= x && x < n - 1) {
      recalc(best, start, x, a, d);
    }
    if (0 <= y && y < n - 1) {
      recalc(best, start, y, a, -d);
    }
    res[j] = best.size() ? *best.rbegin() + 1 : 1;
  }
  for (auto elem : res) {
    cout << elem << "\n";
  }
  return 0;
}
