Problem: You're given an array a of length n. You can perform the following operations on it:

  * choose an index i (1 ≤ i ≤ n), an integer x (0 ≤ x ≤ 10^6), and replace a_j with a_j+x for all (1 ≤ j ≤ i), which means add x to all the elements in the prefix ending at i. 
  * choose an index i (1 ≤ i ≤ n), an integer x (1 ≤ x ≤ 10^6), and replace a_j with a_j \% x for all (1 ≤ j ≤ i), which means replace every element in the prefix ending at i with the remainder after dividing it by x. 



Can you make the array strictly increasing in no more than n+1 operations?

Input

The first line contains an integer n (1 ≤ n ≤ 2000), the number of elements in the array a.

The second line contains n space-separated integers a_1, a_2, ..., a_n (0 ≤ a_i ≤ 10^5), the elements of the array a.

Output

On the first line, print the number of operations you wish to perform. On the next lines, you should print the operations.

To print an adding operation, use the format "1 i x"; to print a modding operation, use the format "2 i x". If i or x don't satisfy the limitations above, or you use more than n+1 operations, you'll get wrong answer verdict.

Examples

Input

3
1 2 3


Output

0

Input

3
7 6 3


Output

2
1 1 1
2 2 4

Note

In the first sample, the array is already increasing so we don't need any operations.

In the second sample:

In the first step: the array becomes [8,6,3].

In the second step: the array becomes [0,2,3].

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e1 + 4;
vector<int> circle;
bool vis[N];
int parent[N];
ll chk[N];
int color[N];
int tim[N];
int dis[N];
int position[N];
vector<int> adj[N];
vector<int> adj1[N];
vector<int> graph[N];
bool has_cycle;
int maxdis, maxnode, Totnode, depth = 1;
bool ok;
queue<int> q;
stack<int> stk;
vector<int> solution;
int indegree[N];
int go[N];
int to[N];
ll x1, x2, x3, x4, x5, x6;
string ss;
int gn, gk;
int main() {
  int t = 1;
  int cas = 0;
  while (t--) {
    ll n, m, i, j, cnt = 0, cnt1 = 0, cnt2 = 0, even = 0, odd = 0, len, k, r, l,
                   z = 0, x = 0, y = 0, flag = 0, sum = 0;
    ll a = 0, b = 0, c = 0, d = 0, ans = 0, rem, add, sub, quot, zero = 0,
       fst = 0, null = 0, snd = 0, lst = 0, rone = 0, one = 0, pos = 0, neg = 0,
       mn = INT_MAX, mx = INT_MIN;
    char ch;
    int h1, h2, m1, m2, h;
    int velo1, velo2, ac1, ac2, tim, hour, mint, sec;
    int node, edge, u, v, cost;
    int bst, wrst;
    double nd, ad, bd, xd, sumd = 0.00;
    string str, str1 = "", str2 = "", str3 = "", strstore1 = "", strstore2 = "";
    cin >> n;
    int arr[n + 4];
    int cum[n + 4];
    memset(cum, 0, sizeof(cum));
    int brr[n + 4];
    memset(brr, 0, sizeof(brr));
    int mod = n + 1;
    for (i = 0; i < n; i++) {
      cin >> arr[i];
    }
    for (i = n - 1; i >= 0; i--) {
      x = arr[i];
      y = cum[i + 1] + x;
      rem = y % mod;
      if (rem == i + 1) {
        brr[i] = 0;
        cum[i] = cum[i + 1] + 0;
      } else {
        if (rem < i + 1) {
          add = (i + 1 - rem);
          brr[i] = add;
          cum[i] = cum[i + 1] + add;
        } else {
          add = mod - rem;
          add += (i + 1);
          cum[i] = cum[i + 1] + add;
          brr[i] = add;
        }
      }
    }
    cout << n + 1 << endl;
    for (i = 0; i < n; i++) {
      cout << 1 << " " << i + 1 << " " << brr[i] << endl;
    }
    cout << 2 << " " << n << " " << n + 1 << endl;
  }
  return 0;
}