#include <bits/stdc++.h>
using namespace std;
int dx[4] = {0, 0, -1, 1};
int dy[4] = {1, -1, 0, 0};
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i += 1) cin >> a[i];
  cout << n + 1 << '\n';
  int add = 0;
  for (int i = n - 1; i >= 0; i -= 1) {
    int val = add + a[i], x;
    for (int j = 0; j < n + 1; j += 1)
      if ((val + j) % n == i) {
        x = j;
        break;
      }
    cout << 1 << ' ' << i + 1 << ' ' << x << '\n';
    add += x;
  }
  cout << 2 << ' ' << n << ' ' << n << '\n';
}
