#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 3e3 + 20, mod = 0;
long long n, a[MAXN];
vector<string> ans;
void Read_input() {
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
}
void solve() {
  bool flag = true;
  for (long long i = n; i > 0; i--) {
    if (a[i] % n != i - 1) {
      flag = false;
      long long r = a[i] % n;
      if (i - 1 > r) {
        r = i - 1 - r;
        ans.push_back("1 " + to_string(i) + " " + to_string(r));
        for (long long j = 1; j <= i; j++) a[j] += r;
      } else {
        r = n + i - 1 - r;
        ans.push_back("1 " + to_string(i) + " " + to_string(r));
        for (long long j = 1; j <= i; j++) a[j] += r;
      }
    }
  }
  if (!flag) ans.push_back("2 " + to_string(n) + " " + to_string(n));
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  Read_input(), solve();
  cout << ans.size() << endl;
  for (auto i : ans) cout << i << endl;
  return 0;
}
