#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int arr[n + 1];
  int i;
  for (i = 1; i <= n; i++) cin >> arr[i];
  arr[0] = -1;
  for (i = 1; i <= n; i++) {
    if (arr[i] <= arr[i - 1]) break;
  }
  if (i == n + 1)
    cout << "0";
  else {
    cout << n + 1 << "\n";
    cout << "1 " << n << " 100005\n";
    for (i = 1; i <= n; i++) {
      cout << "2 " << i << " ";
      int x = (arr[i] + 100005) - (i - 1);
      cout << x << "\n";
    }
  }
  return 0;
}
