#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> A;
  A.push_back(0);
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    A.push_back(x);
  }
  int cur = 0;
  cout << n + 1 << endl;
  for (int i = n; i > 0; i--) {
    if ((A[i] + cur) % (n + 2) != i + 1) {
      cout << 1 << " " << i << " " << (n + 2) - (A[i] + cur) % (n + 2) + (i + 1)
           << endl;
      cur += (n + 2) - (A[i] + cur) % (n + 2) + (i + 1);
    } else
      cout << 1 << " " << i << " " << 0 << endl;
  }
  cout << 2 << " " << n << " " << n + 2 << endl;
}
