#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-9;
const long long MOD = 1e9 + 7;
int a[2222];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << setprecision(20);
  int n;
  cin >> n;
  const int N = 1e5;
  for (int i = 0; i < n; i++) cin >> a[i];
  cout << n + 1 << '\n';
  for (int i = n - 1, p = 0; i >= 0; i--) {
    int cur = ((i - (a[i] + p) % N) + N) % N;
    cout << 1 << ' ' << i + 1 << ' ' << cur << '\n';
    (p += cur) %= N;
  }
  cout << 2 << ' ' << n << ' ' << N << '\n';
  return 0;
}
