#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2e3 + 5;
int n, Q, T;
long long a[MAX_N], d[MAX_N];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  long long Sum = 0;
  for (int i = n; i >= 1; --i) {
    d[i] = i - 1 + n - (a[i] + Sum) % n;
    Sum += d[i];
  }
  cout << n + 1 << endl;
  for (int i = n; i >= 1; --i) cout << 1 << " " << i << " " << d[i] << endl;
  cout << 2 << " " << n << " " << n << endl;
  return 0;
}
