#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n + 10];
  for (int i = 1; i <= n; ++i) cin >> a[i];
  cout << n + 1 << endl;
  for (int i = n; i >= 1; --i) {
    long long ans = 1000000 - a[i] - (n - i + 1);
    if (ans < 0) ans += 1000000;
    cout << 1 << " " << i << " " << ans << endl;
    for (int j = 1; j <= i; ++j) {
      a[j] += ans;
      a[j] %= 1000000;
    }
  }
  cout << 2 << " " << n << " " << 1000000 << endl;
  return 0;
}
