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 JAVA):

Solution:
//    A Computer is Like a mischievous genie.
//    It will give you exactly what you ask for,
//    but not always what you want
//    A code by Rahul Verma


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Set;
import java.util.Spliterator.OfPrimitive;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;


public class Main {


  public static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

  static class FastReader {

    BufferedReader br;
    StringTokenizer st;

    public FastReader() {
      br = new BufferedReader(new
          InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String[] nextSArray() {
      String sr[] = null;
      try {
        sr = br.readLine().trim().split(" ");
      } catch (IOException e) {
        e.printStackTrace();
      }
      return sr;
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }

      return str;
    }
  }


  static long powmodulo(long a, long p) {
    if (p == 0) {
      return 1 % mod;
    }
    if (p == 1) {
      return a % mod;
    }
    long ans = 1;
    while (p > 0) {
      if ((p & 1) > 0) {
        ans = (ans * a) % mod;
      }
      a = (a * a) % mod;
      p = p >> 1;
    }
    return ans % mod;
  }


  static long mod = 1000000007;

  static long gcd(long a, long b) {
    if (a == 0) {
      return b;
    }
    return gcd(b % a, a);
  }

  static long fast_powerNumbers(long a, long n) {
    if (n == 1) {
      return a;
    }
    long ans = fast_powerNumbers(a, n / 2);
    if (n % 2 == 0) {
      return (ans * ans);
    } else {
      return ((ans * ans) * (a));
    }
  }


  static void dfs_helper(int[][] arr, int i, int j, int team, int n, int m) {
    arr[i][j] = team;
    if (i - 1 >= 0 && arr[i - 1][j] == 1) {
      dfs(arr, i - 1, j, team, n, m);
    }
    if (j - 1 >= 0 && arr[i][j - 1] == 1) {
      dfs(arr, i, j - 1, team, n, m);
    }
    if (i + 1 < n && arr[i + 1][j] == 1) {
      dfs(arr, i + 1, j, team, n, m);
    }
    if (j + 1 < m && arr[i][j + 1] == 1) {
      dfs(arr, i, j + 1, team, n, m);
    }

  }

  static void dfs(int[][] arr, int i, int j, int team, int n, int m) {
    dfs_helper(arr, i, j, team, n, m);

  }

  static int parent[];
  static int rank[];

  static int find(int i) {
    if (parent[i] == -1) {
      parent[i] = i;
      return i;
    }

    if (parent[i] == i) {
      return i;
    } else {
      parent[i] = find(parent[i]);
    }
    return parent[i];

  }

  static void unite(int s1, int s2) {

    if (rank[s1] > rank[s2]) {
      parent[s2] = s1;
      rank[s1] += rank[s2];
    } else {
      parent[s1] = s2;
      rank[s2] += rank[s1];
    }
  }


  static int arr[];

  static void seive(int n) {
    arr = new int[n + 1];
    arr[0] = arr[1] = 1;
    for (int i = 4; i <= n; i = i + 2) {
      arr[i] = 1;
    }
    for (int i = 3; i * i <= n; i = i + 2) {
      if (arr[i] == 0) {
        for (int j = i * i; j <= n; j = j + i) {
          arr[j] = 1;
        }

      }
    }
  }

  public static void main(String[] args) throws Exception {
    FastReader sc = new FastReader();



    int n=sc.nextInt();
   int arr[]=new int[n];
    for (int i = 0; i <n ; i++) {
      arr[i]=sc.nextInt()+500000;
    }
    //ArrayList<String>al=new ArrayList<>();
    out.println(n+1);
    out.println(1+" "+n+" "+500000);

    int x=0;
    for (int i = 0; i <n ; i++) {
      out.println(2+" "+(i+1)+" "+(arr[i]-x));
      ++x;
    }

    out.close();



  }

}







// out.println(al.toString().replaceAll("[\\[|\\]|,]",""));