#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, t;
  cin >> n;
  int a[n + 1];
  for (int i = 1; i <= n; i++) cin >> a[i];
  cout << n + 1 << endl;
  cout << 1 << " " << n << " " << 4001 << endl;
  long long int add = 4001;
  for (int i = 1; i <= n; i++) {
    cout << 2 << " " << i << " " << a[i] + add - i << endl;
  }
  return 0;
}
