#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long added = 0;
  long long mod = 2000;
  long long prev = -1;
  vector<int> ops;
  for (int i = n - 1; i >= 0; i--) {
    long long cur = a[i] + added;
    long long times = max(cur / mod + 1, prev + 1);
    long long need = times * mod + (i);
    long long d = need - cur;
    assert(d >= 0);
    assert(d <= 1000000);
    ops.push_back(d);
    added += d;
  }
  reverse(ops.begin(), ops.end());
  cout << n + 1 << endl;
  for (int i = 0; i < n; i++) {
    cout << 1 << " " << i + 1 << " " << ops[i] << endl;
  }
  cout << 2 << " " << n << " " << mod << endl;
}
