#include <bits/stdc++.h>
using namespace std;
const int maxn = 300500;
const int MOD = 1e9 + 7;
const int inf = 1e9;
const int tom = 5000;
int a[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); ++i) scanf("%d", &a[i]);
  printf("%d\n", n + 1);
  int add = tom - 1;
  for (int i = n - 1; i >= 0; i--) {
    int rem = tom - (a[i] % tom) + add;
    --add;
    printf("1 %d %d\n", i + 1, rem);
    for (int j = i; j >= 0; j--) a[j] += rem;
  }
  printf("2 %d %d\n", n, tom);
}
