#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long> arr(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  vector<int> add(n, 0);
  int j = 0;
  int rem;
  long sum_so_far = 0;
  for (int i = n - 1; i >= 0; i--) {
    rem = (arr[i] + sum_so_far) % 2002;
    add[j] = 2001 - rem - j;
    if (add[j] < 0) {
      add[j] = 4004 + add[j];
    }
    sum_so_far += add[j];
    j++;
  }
  cout << (n + 1) << endl;
  j = n;
  for (int i = 1; i <= n; i++) {
    cout << "1 " << j << " " << add[i - 1] << endl;
    j--;
  }
  cout << "2 " << n << " 2002\n";
  return 0;
}
