#include <bits/stdc++.h>
using namespace std;
struct pair_hash {
  template <class T1, class T2>
  std::size_t operator()(const std::pair<T1, T2> &p) const {
    auto h1 = std::hash<T1>{}(p.first);
    auto h2 = std::hash<T2>{}(p.second);
    return h1 ^ h2;
  }
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  long long int arr[n];
  long long int i, j;
  for (i = 0; i < n; i++) cin >> arr[i];
  cout << n + 1 << '\n';
  long long int x = 2001;
  long long int rem = 0;
  for (i = n - 1; i >= 0; i--) {
    arr[i] += rem;
    arr[i] -= (i + 1);
    long long int adr = arr[i] % x;
    rem += (2001 - adr);
    cout << 1 << " " << i + 1 << " " << 2001 - adr << '\n';
  }
  cout << 2 << " " << n << " " << x << '\n';
  return 0;
}
