#include <bits/stdc++.h>
using namespace std;
const long long POSITIVE_INFINITY = 9223372036854775807;
const long long NEGATIVE_INFINITY = -9223372036854775807;
const long long MOD = 1000000007;
const long double PI = acos(-1.0);
template <typename T>
inline T bigMod(T A, T B, T M = MOD) {
  A %= M;
  T ret = 1;
  while (B) {
    if (B & 1) ret = (ret * A) % M;
    A = (A * A) % M;
    B = B >> 1;
  }
  return ret;
}
template <typename T>
inline T invMod(T A, T M = MOD) {
  return bigMod(A, M - 2, M);
}
const int N = 200005;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n;
  cin >> n;
  vector<int> ar(n);
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
  }
  int val = 0;
  cout << n + 1 << "\n";
  for (int i = n - 1; i >= 0; i--) {
    int curr = ar[i] + val;
    curr %= n;
    if (curr <= i) {
      cout << 1 << " " << i + 1 << " " << i - curr << "\n";
      val += i - curr;
    } else {
      cout << 1 << " " << i + 1 << " " << n + i - curr << "\n";
      val += n + i - curr;
    }
    val %= n;
  }
  cout << 2 << " " << n << " " << n << "\n";
  return 0;
}
