#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    a.push_back(temp);
  }
  int ttol = 0;
  vector<int> ans;
  for (int i = n - 1; i > -1; i--) {
    a[i] += ttol;
    int temp = 0;
    if (a[i] % (n + 1) != (i + 1) % (n + 1)) {
      temp = ((a[i] / (n + 1) + 1) * (n + 1)) + (i + 1) % (n + 1) - a[i];
    }
    ttol += temp;
    ans.push_back(temp);
  }
  cout << n + 1 << '\n';
  for (int i = 0; i < n; i++) {
    cout << 1 << ' ' << n - i << ' ' << ans[i] << '\n';
  }
  cout << 2 << ' ' << n << ' ' << n + 1;
}
