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;
struct node {
  int data;
  struct node *left;
  struct node *right;
} *root = NULL;
int binarySearch(int arr[], int l, int r, int x) {
  while (l <= r) {
    int m = l + (r - l) / 2;
    if (arr[m] == x) return m;
    if (arr[m] < x)
      l = m + 1;
    else
      r = m - 1;
  }
  return -1;
}
bool IsPrime(int number) {
  if (number < 2) return false;
  if (number == 2) return true;
  if (number % 2 == 0) return false;
  for (int i = 3; (i * i) <= number; i += 2) {
    if (number % i == 0) return false;
  }
  return true;
}
int ncr(int n, int k) {
  if (k == 0 || k == n) return 1;
  return ncr(n - 1, k - 1) + ncr(n - 1, k);
}
void preorder(struct node *root) {
  struct node *p = root;
  cout << p->data << " ";
  if (p->left != NULL) preorder(p->left);
  if (p->right != NULL) preorder(p->right);
}
struct node *insert(int data, struct node *p) {
  if (p == NULL) {
    struct node *nn = (struct node *)malloc(sizeof(struct node));
    nn->data = data;
    nn->left = nn->right = NULL;
    return nn;
  } else {
    if (p->data > data) {
      p->left = insert(data, p->left);
    } else {
      p->right = insert(data, p->right);
    }
    return p;
  }
}
int gcd(long long int a, long long int b) {
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int lcm(long long int a, long long int b, long long int x, long long int y) {
  long long int p = gcd(a, b);
  long long int l = (a * b) / p;
  if (p == x && l == y)
    return 1;
  else
    return -1;
}
int main() {
  int n, i, val;
  cin >> n;
  int ar[n];
  int c = 0;
  for (i = 0; i < n; i++) {
    cin >> ar[i];
    if (i > 0 && ar[i] <= ar[i - 1]) {
      c = 1;
    }
  }
  if (c == 0) {
    cout << 0;
    return 0;
  }
  cout << n + 1 << "\n";
  int sum = 0, x;
  for (i = n - 1; i >= 0; i--) {
    if ((ar[i] + sum) % n == 0) {
      x = 0;
    }
    if ((ar[i] + sum) > n) {
      x = (((ar[i] + sum) / n) + 1) * n - (ar[i] + sum);
    }
    if (ar[i] + sum < n) {
      x = n - (ar[i] + sum);
    }
    sum += x + i;
    cout << 1 << " " << i + 1 << " " << i + x << "\n";
  }
  cout << 2 << " " << n << " " << n << "\n";
  return 0;
}