#include <bits/stdc++.h>
using namespace std;
const int inf = 2e3 + 7;
int arr[inf];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &arr[i]);
  printf("%d\n", n + 1);
  printf("1 %d 500000\n", n);
  for (int i = 1; i <= n; i++) arr[i] += 500000;
  for (int i = 1; i <= n; i++) {
    printf("2 %d %d\n", i, arr[i] - i + 1);
  }
  return 0;
}
