#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  cout << n + 1 << "\n";
  cout << "2 " << n << " "
       << "1\n";
  cout << "1 " << n << " " << 1000000 << "\n";
  for (int i = 0; i < n - 1; i++) {
    cout << "2 " << i + 1 << " " << 1000000 - i - 1 << "\n";
  }
  return 0;
}
