#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  int f = 0;
  for (long long i = 0; i < n - 1; i++) {
    if (a[i] >= a[i + 1]) {
      f = 1;
      break;
    }
  }
  if (f == 0) {
    cout << 0 << "\n";
    return 0;
  }
  cout << n + 1 << "\n";
  for (long long i = n - 1; i >= 0; i--) {
    long long s = (n + i) - a[i] % n;
    cout << 1 << " " << i + 1 << " " << s << "\n";
    for (long long j = i; j >= 0; j--) a[j] += s;
  }
  cout << 2 << " " << n << " " << n << "\n";
  cout << "\n";
  return 0;
}
