#include <bits/stdc++.h>
using namespace std;
const long long mod = 900000;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  cout << n + 1 << endl;
  long long s = 0;
  for (long long i = 0; i < n; i++) {
    long long curp = (9 * mod - i - 1 - s - a[n - i - 1]) % mod;
    cout << 1 << " " << n - i << " " << curp << endl;
    s = (s + curp) % mod;
  }
  cout << 2 << " " << n << " " << mod + 1 << endl;
  return 0;
}
