#include <bits/stdc++.h>
using namespace std;
struct edge {
  long long a, b, cost;
  edge(long long x, long long y, long long z) : a(x), b(y), cost(z){};
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> v[i];
  vector<long long> res, ans(n + 1);
  long long d = n + 1, sum = 0;
  for (long long i = (long long)(0); i <= (long long)(n - 1); i++) {
    long long x = v[i] % d;
    res.push_back(d - x + i);
  }
  for (long long i = (long long)(n - 1); i >= (long long)(0); i--) {
    long long k = res[i] - sum;
    while (k < 0) k += (d);
    sum += k;
    ans[i] = k;
  }
  cout << n + 1 << endl;
  for (long long i = (long long)(0); i <= (long long)(n - 1); i++) {
    cout << "1 " << i + 1 << " " << ans[i] << endl;
  }
  cout << "2 " << n << " " << d << endl;
  return 0;
}
