#include <bits/stdc++.h>
using namespace std;
int a[1000000];
const int mod = 1e4;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int kase = 1, b = a[0];
  for (int i = 1; i <= n; i++)
    if (a[i] <= a[i - 1]) {
      kase = 0;
      break;
    }
  if (!kase) {
    printf("%d\n", n + 1);
    printf("1 %d %d\n", n, mod);
    for (int i = 1; i <= n; i++) {
      printf("2 %d %d\n", i, a[i] + mod - i);
    }
  } else
    printf("0\n");
  return 0;
}
