#include using namespace std; #define rep(i, l, r) for (int i = (int)(l); i<(int)(r); i++) #define ll long long int main() { int K; cin >> K; vector D(K); rep(i, 0, K) cin >> D[i]; sort(D.begin(), D.end()); int N = 2 * K + 1; cout << N << endl; int now = K+2; cout << 1 << " " << now << " " << D[0]/2 << endl; cout << 2 << " " << now << " " << D[0]/2 << endl; for (int i = 3; i <= K+1; i++) { cout << now << " " << (++now) << " " << (D[i-2]-D[i-3])/2 << endl; cout << now << " " << i << " " << D[i-2]/2 << endl; } cout << K+1 << endl; rep(i, 1, K+2) cout << i << " "; cout << endl; }