#include#include
using namespace std;typedeflonglong ll;constint INF =0x3f3f3f3f;constint MAXN =2e3+10;int a[MAXN];intmain(){#ifdef LOCAL//freopen("C:/input.txt", "r", stdin);#endifint N;
cin >> N;for(int i =0; i < N; i++)scanf("%d",&a[i]);int tot =0;//累加量
cout << N +1<< endl;for(int i = N -1; i >=0; i--){int x = i -((a[i]+ tot)% N)+ N;//调整当前位置%N后值为i的增加量
tot += x;printf("1 %d %d
", i +1, x);}printf("2 %d %d
", N, N);return0;}