#include <bits/stdc++.h>
using namespace std;
long long a[20010];
int main() {
  int n, i, j, t;
  long long s = 0;
  cin >> n;
  t = n + 1;
  for (i = 1; i <= n; i++) cin >> a[i];
  cout << n + 1 << endl;
  for (i = n; i >= 1; i--) {
    a[i] += s;
    a[i] %= t;
    s += t - a[i] + i;
    cout << 1 << " " << i << " " << t - a[i] + i << endl;
  }
  cout << 2 << " " << n << " " << n + 1;
  return 0;
}
