#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int64_t> v(n);
  for (int i = 0; i < n; ++i) cin >> v[i];
  cout << n + 1 << endl;
  for (int i = n - 1; i >= 0; --i) {
    int64_t d = (i + 1) - v[i];
    if (d < 0) {
      d += (n + 1) * ((n - d) / (n + 1));
    }
    cout << "1 " << i + 1 << ' ' << d << endl;
    for (int j = 0; j <= i; ++j) v[j] += d;
  }
  cout << "2 " << n << ' ' << n + 1 << endl;
  return 0;
}
