#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n];
  bool isinc = true;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (i) {
      if (a[i] <= a[i - 1]) {
        isinc = false;
      }
    }
  }
  if (isinc) {
    cout << 0 << endl;
    return 0;
  }
  cout << n + 1 << endl;
  long long sum = 0;
  for (long long i = n - 1; i >= 0; i--) {
    long long add = ((i - a[i] - sum) % n + n) % n;
    cout << 1 << " " << i + 1 << " " << add << endl;
    sum += add;
  }
  cout << 2 << " " << n << " " << n << endl;
}
