#include <bits/stdc++.h>
using namespace std;
long long a[2000];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i] += 10000 + 5;
  }
  cout << n + 1 << endl;
  cout << 1 << " " << n << " " << 10000 + 5 << endl;
  for (int i = 1; i <= n; i++) {
    cout << 2 << " " << i << " " << a[i] - i + 1 << endl;
    a[i] = a[i] % (a[i] - i + 1);
  }
  return 0;
}
