#include <bits/stdc++.h>
using namespace std;
long long arr[100005];
signed main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  for (long long i = 1; i < n + 1; i++) {
    cin >> arr[i];
  }
  long long ct = 0;
  long long v = n + 1;
  long long addv;
  vector<pair<long long, long long> > ans;
  for (long long i = n; i >= 1; i--) {
    if (arr[i] % v == i) {
      continue;
    }
    ct++;
    long long z = arr[i] % v;
    if (z > i) {
      addv = v - z;
      addv += i;
    } else {
      addv = i - z;
    }
    ans.push_back({i, addv});
    for (long long j = 1; j < n; j++) {
      arr[j] += addv;
    }
  }
  ct++;
  cout << ct << endl;
  for (long long i = 0; i < ans.size(); i++) {
    cout << "1 " << ans[i].first << " " << ans[i].second << endl;
  }
  cout << "2 " << n << " " << v << endl;
  return 0;
}
