#include <bits/stdc++.h>
using namespace std;
struct hash_pair {
  template <class T1, class T2>
  size_t operator()(const pair<T1, T2>& p) const {
    auto hash1 = hash<T1>{}(p.first);
    auto hash2 = hash<T2>{}(p.second);
    return hash1 ^ hash2;
  }
};
long long t;
long long m = 1e9 + 7;
long long arr[2005];
int main() {
  long long a, b, c, d, e, f, g, i, j;
  long long n, k, x;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  f = 0;
  cout << n + 1 << endl;
  for (i = n - 1; i >= 0; i--) {
    arr[i] = arr[i] + f;
    b = arr[i] % n;
    c = i;
    if (b > c) c = c + n;
    f += (c - b);
    cout << "1" << ' ' << i + 1 << ' ' << c - b << endl;
  }
  cout << "2" << ' ' << n << ' ' << n << endl;
}
