#include <bits/stdc++.h>
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
const long double eps = 1e-12;
const long double Pi = acos(-1);
const long long md = 1e13 + 7;
using namespace std;
long long n, a[2020];
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  long long add = 0;
  cout << n + 1 << "\n";
  for (long long i = n; i >= 1; i--) {
    long long cur = a[i] + add;
    long long temp = (i - cur % (n + 1));
    if (temp < 0) temp = (n + 1) - cur % (n + 1) + i;
    add += temp;
    cout << "1 " << i << " " << temp << "\n";
  }
  cout << 2 << " " << n << " " << n + 1 << "\n";
  return 0;
}
