#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> v;
  for (long long i = 0; i < n; i++) {
    long long g;
    cin >> g;
    v.push_back(g);
  }
  cout << n + 1 << endl;
  cout << "1 " << n << " 500000";
  cout << endl;
  for (long long i = 0; i < n; i++) {
    cout << 2 << " " << i + 1 << " " << v[i] + 500000 - i - 1;
    cout << endl;
  }
}
