#include <bits/stdc++.h>
using namespace std;
struct operition {
  int type;
  int len;
  int number;
} a[2005];
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(NULL);
  std::cout.tie(NULL);
  int n;
  cin >> n;
  long long num[2005];
  for (int i = 0; i < n; ++i) {
    cin >> num[i];
  }
  int cnt = 0;
  long long sum = 0;
  for (int j = n - 1; j >= 0; --j) {
    if ((num[j] + sum) % 2000 != j) {
      a[cnt].type = 1;
      a[cnt].len = j + 1;
      a[cnt].number = 2000 - ((num[j] + sum) - j) % 2000;
      sum += a[cnt].number % 2000;
      cnt++;
    }
  }
  a[cnt].type = 2;
  a[cnt].len = n;
  a[cnt].number = 2000;
  cout << cnt + 1 << endl;
  for (int k = 0; k <= cnt; ++k) {
    cout << a[k].type << ' ' << a[k].len << ' ' << a[k].number << endl;
  }
  return 0;
}
