#include <bits/stdc++.h>
using namespace std;
vector<int> v;
vector<pair<int, pair<int, int> > > op;
int main() {
  ios_base::sync_with_stdio(false);
  int flag = 1, n, num;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> num;
    v.push_back(num);
    if (i > 0 && v[i] <= v[i - 1]) flag = 0;
  }
  if (flag == 1)
    cout << "0" << endl;
  else {
    op.push_back(make_pair(1, make_pair(n, 900000)));
    for (int i = 0; i < n - 1; ++i) {
      v[i] = 900000 + v[i];
      op.push_back(make_pair(2, make_pair(i + 1, v[i] - i)));
    }
    int sz = op.size();
    cout << sz << endl;
    for (int i = 0; i < sz; ++i) {
      cout << op[i].first << " " << op[i].second.first << " "
           << op[i].second.second << endl;
    }
  }
  return 0;
}
