#include <bits/stdc++.h>
using namespace std;
long long n, a[2020], sum;
long long moo = 20000;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  cout << n + 1 << "\n";
  for (int i = n; i >= 1; i--) {
    long long lisatan = (moo - (a[i] + sum) % moo) + i;
    a[i] += lisatan + sum;
    cout << "1 " << i << " " << lisatan << "\n";
    sum += lisatan;
  }
  cout << "2 " << n << " " << moo;
}
