#include <bits/stdc++.h>
using namespace std;
const int N = 300000;
long long a[N + 5], d[N + 5];
struct T {
  int l, r, len, _len;
};
struct Cmp1 {
  bool operator()(const T &x, const T &y) const {
    return x.l == y.l ? x.r < y.r : x.l < y.l;
  }
};
struct Cmp2 {
  bool operator()(const T &x, const T &y) const {
    return x.len + x._len == y.len + y._len
               ? (x.l == y.l ? x.r < y.r : x.l < y.l)
               : x.len + x._len < y.len + y._len;
  }
};
set<T, Cmp1> S1;
set<T, Cmp2> S2;
inline set<T, Cmp1>::iterator Insert(T tmp) {
  S2.insert(tmp);
  return S1.insert(tmp).first;
}
inline void Erase(T tmp) {
  S1.erase(tmp);
  S2.erase(tmp);
}
template <typename T>
inline void Print(T &S) {
  for (auto it : S)
    cout << it.l << ' ' << it.r << ' ' << it.len << ' ' << it._len << endl;
}
void Print_d(int n) {
  for (int i = 2; i <= n; ++i) cout << d[i] << ' ';
  cout << endl;
}
void fun1(int n) {
  int l, r, len, _len;
  for (int i = 2; i <= n; ++i) {
    if (d[i] > 0) {
      if (d[i - 1] <= 0) {
        l = i;
        len = _len = 0;
      }
      ++len;
      if (d[i + 1] == 0) {
        Insert({l, i, len, _len});
      }
    } else if (d[i] < 0) {
      if (d[i - 1] == 0) {
        l = i;
        r = len = _len = 0;
      }
      ++_len;
      if (d[i + 1] >= 0) {
        Insert({l, i, len, _len});
      }
    } else {
      Insert({i, i, 0, 0});
    }
  }
}
void fun2(int p, long long add) {
  auto re = S1.upper_bound({p, INT_MAX, 0, 0});
  --re;
  T tmp = *re;
  Erase(tmp);
  decltype(re) itl, itr;
  if (d[p] < 0) {
    d[p] += add;
    if (d[p] > 0) {
      if (p - tmp.l == tmp.len) {
        itl = itr = Insert({tmp.l, tmp.r, tmp.len + 1, tmp._len - 1});
      } else {
        itl = itr = Insert({p, tmp.r, 1, tmp.r - p});
        if (p > tmp.l) {
          itl = Insert({tmp.l, p - 1, tmp.len, tmp._len - (tmp.r - p + 1)});
        }
      }
    } else if (d[p] == 0) {
      itl = itr = Insert({p, p, 0, 0});
      if (p > tmp.l) {
        itl = Insert({tmp.l, p - 1, tmp.len, tmp._len - (tmp.r - p + 1)});
      }
      if (p < tmp.r) {
        itr = Insert({p + 1, tmp.r, 0, tmp.r - p});
      }
    } else {
      Insert(tmp);
      return;
    }
  } else if (d[p] > 0) {
    d[p] += add;
    if (d[p] < 0) {
      if (tmp.r - p == tmp._len) {
        itl = itr = Insert({tmp.l, tmp.r, tmp.len - 1, tmp._len + 1});
      } else {
        itl = itr = Insert({tmp.l, p, p - tmp.l, 1});
        if (p < tmp.r) {
          itr = Insert({p + 1, tmp.r, tmp.len - (p - tmp.l + 1), tmp._len});
        }
      }
    } else if (d[p] == 0) {
      itl = itr = Insert({p, p, 0, 0});
      if (p > tmp.l) {
        itl = Insert({tmp.l, p - 1, p - tmp.l, 0});
      }
      if (p < tmp.r) {
        itr = Insert({p + 1, tmp.r, tmp.len - (p - tmp.l + 1), tmp._len});
      }
    } else {
      Insert(tmp);
      return;
    }
  } else {
    d[p] += add;
    if (d[p] > 0) {
      itl = itr = Insert({p, p, 1, 0});
    } else if (d[p] < 0) {
      itl = itr = Insert({p, p, 0, 1});
    } else {
      Insert(tmp);
      return;
    }
  }
  tmp = {p, p, 0, 0};
  if (itl != S1.begin()) {
    auto it = itl;
    --it;
    if (it->len + it->_len && itl->len + itl->_len) {
      if (itl->len) {
        if (!it->_len) tmp = {it->l, itl->r, it->len + itl->len, itl->_len};
      } else {
        tmp = {it->l, itl->r, it->len, it->_len + itl->_len};
      }
    }
    if (tmp.len + tmp._len) {
      Erase(*it);
      if (itl == itr) {
        Erase(*itl);
        itr = Insert(tmp);
      } else {
        Erase(*itl);
        Insert(tmp);
      }
    }
  }
  tmp = {p, p, 0, 0};
  if (itr != S1.end()) {
    auto it = itr;
    ++it;
    if (it != S1.end() && it->len + it->_len && itr->len + itr->_len) {
      if (itr->_len) {
        if (!it->len) tmp = {itr->l, it->r, itr->len, itr->_len + it->_len};
      } else {
        tmp = {itr->l, it->r, itr->len + it->len, it->_len};
      }
    }
    if (tmp.len + tmp._len) {
      Erase(*it);
      Erase(*itr);
      Insert(tmp);
    }
  }
}
int main() {
  int n, m, l, r;
  long long add;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%lld", a + i);
  for (int i = 2; i <= n; ++i) d[i] = a[i] - a[i - 1];
  fun1(n);
  scanf("%d", &m);
  for (int i = 1; i <= m; ++i) {
    scanf("%d %d %lld", &l, &r, &add);
    if (l > 1) fun2(l, add);
    if (r < n) fun2(r + 1, -add);
    if (n == 1)
      printf("%d\n", 1);
    else
      printf("%d\n", S2.rbegin()->len + S2.rbegin()->_len + 1);
  }
  return 0;
}
