#include <bits/stdc++.h>
using namespace std;
int arr[2001];
int opp[2001][3];
int optop = 0;
void op(int w, int idx, int x) {
  if (w == 1) {
    for (int i = 1; i <= idx; i++) {
      arr[i] += x;
    }
  } else if (w == 2) {
    for (int i = 1; i <= idx; i++) {
      arr[i] %= x;
    }
  }
  opp[optop][0] = w;
  opp[optop][1] = idx;
  opp[optop++][2] = x;
}
int main() {
  int n, cnt = 0, modidx, x;
  scanf("%d", &n);
  modidx = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
  }
  for (int i = n; i >= 1; i--) {
    if (arr[i] < i) {
      op(1, i, i - arr[i]);
      cnt++;
      if (modidx == 0) {
        modidx = i;
        x = i + 1;
      }
    } else if (arr[i] > i) {
      if (modidx == 0) {
        modidx = i;
        x = i + 1;
      }
      int t = 1;
      while (arr[i] > x * t + i) {
        t++;
      }
      op(1, i, x * t + i - arr[i]);
      cnt++;
    }
  }
  if (modidx != 0) {
    cnt++;
    op(2, modidx, x);
  }
  printf("%d\n", cnt);
  for (int i = 0; i < optop; i++) {
    printf("%d %d %d\n", opp[i][0], opp[i][1], opp[i][2]);
  }
  return 0;
}
