#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, unsigned long long int y,
                    long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int n, m, k;
int32_t main() {
  long long int n;
  cin >> n;
  vector<long long int> v(n);
  for (long long int i = 0; i < n; i++) cin >> v[i];
  vector<vector<long long int> > ans;
  for (long long int i = n - 1; i >= 0; i--) {
    long long int val = v[i] + n - i;
    long long int remain = val % 3000;
    if (remain != 0) {
      remain = 3000 - remain;
    }
    for (long long int k = 0; k < i + 1; k++) {
      v[k] += remain;
    }
    ans.push_back({1, i + 1, remain});
  }
  cout << n + 1 << endl;
  for (long long int i = 0; i < ans.size(); i++) {
    for (long long int j = 0; j < 3; j++) {
      cout << ans[i][j] << " ";
    }
    cout << endl;
  }
  cout << 2 << " " << n << " " << 3000 << endl;
}
