#include <bits/stdc++.h>
using namespace std;
int nums[2005];
void jia(int i, int x) {
  for (int j = 0; j <= i; ++j) nums[j] += x;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", nums + i);
  if (n == 1) {
    printf("0\n");
    return 0;
  }
  printf("%d\n", n + 1);
  printf("1 %d %d\n", n, n);
  for (int i = 0; i < n; ++i) nums[i] += n;
  int temp;
  for (int i = n - 2; i >= 0; --i) {
    temp = i + 1 - nums[i] % n + n;
    jia(i, temp);
    printf("1 %d %d\n", i + 1, temp);
  }
  printf("2 %d %d\n", n - 1, n);
  return 0;
}
