import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.string;

void main() {
    auto N = readln.chomp.to!int;
    auto A = readln.split.map!(to!long).array;

    auto ans = new long[](N);
    long a = 0;

    foreach_reverse (i; 0..N) {
        long m = (A[i] + a) % N;
        long b = ((i - m) % N + N) % N;
        ans[i] = b;
        a += b;
    }

    writeln(N+1);
    foreach (i; 0..N) {
        writeln(1, " ", N-i, " ", ans[N-i-1]);
    }
    writeln(2, " ", N, " ", N);
}
