#include <bits/stdc++.h>
const long double eps = 1e-8;
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    vector<long long int> v(n);
    for (auto &i : v) cin >> i;
    long long int ans = max(n + 5, *max_element(v.begin(), v.end()) + 5);
    long long int temp, c = 1;
    cout << n + 1 << "\n";
    for (long long int i = n - 1; i >= 0; i--) {
      temp = ans - (v[i] % ans) - c;
      if (temp < 0) temp += ans;
      cout << 1 << " " << i + 1 << " " << temp << "\n";
      for (long long int j = 0; j < i + 1; j++) v[j] += temp;
      c++;
    }
    cout << 2 << " " << n << " " << ans << "\n";
  }
}
