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