#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t, cnt, tmp;
  bool flag = 1;
  cin >> t;
  vector<long long> arr(t);
  cnt = t - 1;
  for (int i = 0; i < t; i++) {
    cin >> arr[i];
    if (i && flag && arr[i - 1] >= arr[i]) flag = 0;
  }
  if (flag) {
    cout << 0 << '\n';
  } else {
    cout << t + 1 << '\n';
    for (int i = t - 1; i >= 0; i--) {
      cout << "1 " << i + 1;
      tmp = i - (arr[i] - arr[i] / t * t);
      while (tmp < 0) tmp += t;
      cout << " " << tmp << '\n';
      for (int j = 0; j <= i; j++) {
        arr[j] += tmp;
      }
    }
    cout << "2 " << t << " " << t << '\n';
  }
  return 0;
}
