#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int &i : a) cin >> i;
  for (int &i : a) i += 5000;
  cout << n + 1 << endl;
  cout << "1 " << n << " 5000" << endl;
  for (int i = 0; i < n; i++) {
    int j = i + 1;
    cout << "2 " << j << " " << a[i] - j << endl;
  }
  return 0;
}
