#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, n, i, j;
  scanf("%lld", &n);
  vector<long long> v;
  for (i = 0; i < n; i++) {
    scanf("%lld", &t);
    v.push_back(t);
  }
  printf("%lld\n", n + 1);
  for (i = n - 1; i >= 0; i--) {
    if ((v[i] % n) == i) {
      cout << 1 << " " << i + 1 << " " << 0 << "\n";
      v[i] = v[i] % n;
    } else {
      if ((i - (v[i] % n)) > 0) {
        t = i - (v[i] % n);
      } else {
        t = i + (n - (v[i] % n));
      }
      for (j = i; j >= 0; j--) {
        v[j] += t;
      }
      v[i] = v[i] % n;
      cout << 1 << " " << i + 1 << " " << t << "\n";
    }
  }
  cout << 2 << " " << n << " " << n << "\n";
  return 0;
}
