#include <bits/stdc++.h>
using namespace std;
struct node {
  int data;
  struct node *left;
  struct node *right;
} *root = NULL;
int binarySearch(int arr[], int l, int r, int x) {
  while (l <= r) {
    int m = l + (r - l) / 2;
    if (arr[m] == x) return m;
    if (arr[m] < x)
      l = m + 1;
    else
      r = m - 1;
  }
  return -1;
}
bool IsPrime(int number) {
  if (number < 2) return false;
  if (number == 2) return true;
  if (number % 2 == 0) return false;
  for (int i = 3; (i * i) <= number; i += 2) {
    if (number % i == 0) return false;
  }
  return true;
}
int ncr(int n, int k) {
  if (k == 0 || k == n) return 1;
  return ncr(n - 1, k - 1) + ncr(n - 1, k);
}
void preorder(struct node *root) {
  struct node *p = root;
  cout << p->data << " ";
  if (p->left != NULL) preorder(p->left);
  if (p->right != NULL) preorder(p->right);
}
struct node *insert(int data, struct node *p) {
  if (p == NULL) {
    struct node *nn = (struct node *)malloc(sizeof(struct node));
    nn->data = data;
    nn->left = nn->right = NULL;
    return nn;
  } else {
    if (p->data > data) {
      p->left = insert(data, p->left);
    } else {
      p->right = insert(data, p->right);
    }
    return p;
  }
}
int gcd(long long int a, long long int b) {
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int lcm(long long int a, long long int b, long long int x, long long int y) {
  long long int p = gcd(a, b);
  long long int l = (a * b) / p;
  if (p == x && l == y)
    return 1;
  else
    return -1;
}
int main() {
  int n, i, val;
  cin >> n;
  int ar[n];
  int c = 0;
  for (i = 0; i < n; i++) {
    cin >> ar[i];
    if (i > 0 && ar[i] <= ar[i - 1]) {
      c = 1;
    }
  }
  if (c == 0) {
    cout << 0;
    return 0;
  }
  cout << n + 1 << "\n";
  int sum = 0, x;
  for (i = n - 1; i >= 0; i--) {
    if ((ar[i] + sum) % n == 0) {
      x = 0;
    }
    if ((ar[i] + sum) > n) {
      x = (((ar[i] + sum) / n) + 1) * n - (ar[i] + sum);
    }
    if (ar[i] + sum < n) {
      x = n - (ar[i] + sum);
    }
    sum += x + i;
    cout << 1 << " " << i + 1 << " " << i + x << "\n";
  }
  cout << 2 << " " << n << " " << n << "\n";
  return 0;
}
