#include <bits/stdc++.h>
using namespace std;
int arr[2010];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, c = 0, d = 0, a, b;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  cout << n + 1 << endl;
  for (int i = n - 1; i >= 0; i--) {
    a = (arr[i] + c) / n;
    a++;
    if ((arr[i] + c) % n == 0) a--;
    d = abs(a * n + i - (arr[i] + c));
    c += d;
    cout << 1 << " " << i + 1 << " " << d << endl;
  }
  cout << 2 << " " << n << " " << n << endl;
  return 0;
}
