#include <bits/stdc++.h>
using namespace std;
long long a[100000 + 10];
int main() {
  long long n;
  while (cin >> n) {
    memset(a, 0, sizeof(a));
    for (long long i = 1; i <= n; ++i) cin >> a[i];
    int sum = 0;
    long long M = n + 1;
    cout << n + 1 << endl;
    for (long long i = n; i >= 1; --i) {
      for (long long j = 1;; ++j) {
        if ((a[i] + j + sum) % M == i) {
          cout << "1"
               << " " << i << " " << j << endl;
          sum += j;
          break;
        }
      }
    }
    cout << "2 " << n << " " << M << endl;
  }
  return 0;
}
