#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (auto &x : v) cin >> x;
  cout << n + 1 << endl;
  for (long long i = n - 1; i >= 0; i--) {
    cout << "1 " << i + 1 << " " << i + n - (v[i] % n) << endl;
    for (long long j = 0; j <= i; j++) v[j] += i + n - (v[i] % n);
  }
  for (long long i = 0; i < n; i++) v[i] %= n;
  cout << "2 " << n << " " << n << endl;
  return 0;
}
