#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int NINF = 0xc0c0c0c0;
const double PI = acos(-1.0);
const int maxn = 3000;
int a[maxn];
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  long long sum = 0;
  printf("%d\n", n + 1);
  for (int i = n; i > 0; i--) {
    int y = ((a[i] + sum) % n);
    int x = i - 1 - y;
    if (y > i - 1) x = i - 1 + n - y;
    sum += x;
    printf("%d %d %d\n", 1, i, x);
  }
  printf("%d %d %d\n", 2, n, n);
}
