Problem: Leo Jr. draws pictures in his notebook with checkered sheets (that is, each sheet has a regular square grid printed on it). We can assume that the sheets are infinitely large in any direction.

To draw a picture, Leo Jr. colors some of the cells on a sheet gray. He considers the resulting picture beautiful if the following conditions are satisfied:

  * The picture is connected, that is, it is possible to get from any gray cell to any other by following a chain of gray cells, with each pair of adjacent cells in the path being neighbours (that is, sharing a side).
  * Each gray cell has an even number of gray neighbours.
  * There are exactly n gray cells with all gray neighbours. The number of other gray cells can be arbitrary (but reasonable, so that they can all be listed).



Leo Jr. is now struggling to draw a beautiful picture with a particular choice of n. Help him, and provide any example of a beautiful picture.

To output cell coordinates in your answer, assume that the sheet is provided with a Cartesian coordinate system such that one of the cells is chosen to be the origin (0, 0), axes 0x and 0y are orthogonal and parallel to grid lines, and a unit step along any axis in any direction takes you to a neighbouring cell.

Input

The only line contains a single integer n (1 ≤ n ≤ 500) — the number of gray cells with all gray neighbours in a beautiful picture.

Output

In the first line, print a single integer k — the number of gray cells in your picture. For technical reasons, k should not exceed 5 ⋅ 10^5.

Each of the following k lines should contain two integers — coordinates of a gray cell in your picture. All listed cells should be distinct, and the picture should satisdfy all the properties listed above. All coordinates should not exceed 10^9 by absolute value.

One can show that there exists an answer satisfying all requirements with a small enough k.

Example

Input


4


Output


12
1 0
2 0
0 1
1 1
2 1
3 1
0 2
1 2
2 2
3 2
1 3
2 3

Note

The answer for the sample is pictured below:

<image>

Solution (in JAVA):

Solution:
import java.io.*; 
import java.util.*; 
//import javafx.util.*; 
import java.math.*;
//import java.lang.*;
public class Main 
{ 
    
   // static int n;
//  static HashSet<Integer> adj[];

   // static int dist[];
   // static int remove[];
//    static boolean isLeaf[];
  //   static Long dp[][];
   // static int arr[];
  //  static boolean ok;
    // static long arr[];
    // static long sum[];
  //  static boolean ok;
    static long mod=998244353;
    static HashSet<Integer> adjacency[];static int vis[];static boolean is;static int sta=-1;static ArrayList<Integer> cyc;
    static final long oo=(long)1e18;
    public static void main(String[] args) throws IOException { 
    //    Scanner sc=new Scanner(System.in);
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        br = new BufferedReader(new InputStreamReader(System.in));
       // int test=nextInt();
       int test=1;
        
        outer: while(test--!=0){
                int n=nextInt();
                // char arr[][]=new char[30][30];
                // for(int i=0;i<30;i++){
                //     Arrays.fill(arr[i],' ');
                // }
                HashSet<String> hs=new HashSet<>();
                boolean piece[][]=new boolean[30][30];
                for(int i=0;i<5;i++){
                    for(int j=0;j<5;j++){
                        if(i==0){
                            if(j<=2)
                                piece[i][j]=true;
                        }
                        if(i==1){
                            if(j==0||j==2)
                                piece[i][j]=true;
                        }
                        if(i==2){
                            
                            piece[i][j]=true;
                        }
                        if(i==3){
                            if(j==4||j==2)
                                piece[i][j]=true;
                        }
                        if(i==4){
                            if(j>=2)
                                piece[i][j]=true;
                        }

                    }
                }
                pw.println(7*n+8);
                int idx=0;
                int check=0;
                if(n%2==0){
                     check=1;
                }
                n=(n+1)/2;
                
                int count=0;
                for(int i=1;i<=n;i++){

                    
                
                    for(int j=0;j<5;j++){
                        for(int k=0;k<5;k++){
                            if(piece[j][k]){
                       //         arr[j+idx][k]='X';
                                String a=(j+idx)+" "+k;
                                if(!hs.contains(a)){
                                    pw.println((j+idx)+" "+k);
                                }
                                hs.add(a);
                                count++;
                            }
                        }
                    }

                    idx+=4;
                }
                if(check==1){
                    for(int i=0;i<2;i++){
                        
                        String a=(idx)+" "+i;
                        if(!hs.contains(a)){
                            pw.println((idx)+" "+i);
                        }
                        hs.add(a);
                       // arr[idx][i]='X';
                        count++;
                    }
                    String a=(idx+1)+" 0";
                        if(!hs.contains(a)){
                            pw.println((idx+1)+" 0");
                        }
                        hs.add(a);
                      a=(idx+1)+" 2";
                        if(!hs.contains(a)){
                            pw.println((idx+1)+" 2");
                        }
                        hs.add(a);
                    //pw.println((idx+1)+" 2");
                    count++;
                    count++;
                    // arr[idx+1][0]='X';
                    // arr[idx+1][2]='X';
                    for(int i=0;i<=2;i++){
                          a=(idx+2)+" "+i;
                        if(!hs.contains(a)){
                            pw.println((idx+2)+" "+i);
                        }
                        hs.add(a);
                       // arr[idx+2][i]='X';
                        
                       // count++;
                    }
                }
                // pw.println(count);
                // for(int i=0;i<30;i++){
                //     for(int j=0;j<30;j++){
                //         pw.print(arr[i][j]+" ");
                //     }
                //     pw.println();
                // }
            }
           
        pw.close();
    }
    static class Pair implements Comparable<Pair>{
        int x;int y;
        Pair(int x,int y){
          //  this.index=index;
            this.x=x;
            this.y=y;
            //this.z=z;
        }   
        public int compareTo(Pair p){
            return x-p.x;
        }
    }
   static void update(long tree[],int idx,long val){
        
        while(idx<100006){
       
            tree[idx]+=val;
            idx+=(idx)&(-idx);
        }
    }   
    static long sum(long tree[],int idx){
        long sum=0;
        while(idx>0){
           
            sum+=tree[idx];
            idx-=(idx)&(-idx);
        }
        return sum;
    }
    public static BufferedReader br;
    public static StringTokenizer st;
    public static String next() {
        while (st == null || !st.hasMoreTokens()) {
       try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
        return st.nextToken();
    }
 
    public static Integer nextInt() {
        return Integer.parseInt(next());
    }
    public static Long nextLong() {
        return Long.parseLong(next());
    }
 
    public static Double nextDouble() {
        return Double.parseDouble(next());
    }
    // static class Pair{
    //     int x;int y;
    //     Pair(int x,int y,int z){
    //         this.x=x;
    //         this.y=y;
    //        // this.z=z;
    //      //   this.z=z;
    //       //  this.i=i;
    //     }
    // }
    // static class sorting implements Comparator<Pair>{
    //     public int compare(Pair a,Pair b){
    //         //return (a.y)-(b.y);
    //         if(a.y==b.y){
    //             return -1*(a.z-b.z);
    //         }
    //         return (a.y-b.y);
    //     }
   // }

    static long ncr(long n,long r){
        
        if(r==0)
            return 1l;
        long val=ncr(n-1,r-1);
        val=(n*val);
        val=(val/r);
        return val;
    }

    public static int[] na(int n)throws IOException{
        int[] a = new int[n];
        for(int i = 0;i < n;i++)a[i] = nextInt();
        return a;
    }
    static class query implements Comparable<query>{
        int l,r,idx,block;
        static int len;
        query(int l,int r,int i){
            this.l=l;
            this.r=r;
            this.idx=i;
            this.block=l/len;
        }   
        public int compareTo(query a){
            return block==a.block?r-a.r:block-a.block;
        }
    }
    
    // static class sorting implements Comparator<Pair>{  
    //     public int compare(Pair a1,Pair a2){  
    //         if(o1.a==o2.a)
    //             return (o1.b>o2.b)?1:-1;  
    //         else if(o1.a>o2.a)  
    //             return 1;  
    //         else  
    //             return -1;  
    //     }
    // }  
    static boolean isPrime(int n) { 
        if (n <= 1) 
            return false; 
        if (n <= 3) 
            return true; 
        if (n % 2 == 0 ||  
            n % 3 == 0) 
            return false; 
      
        for (int i = 5; 
                 i * i <= n; i = i + 6) 
            if (n % i == 0 || 
                n % (i + 2) == 0) 
                return false; 
      
        return true; 
    } 
    static int gcd(int a, int b) { 
      if (b == 0) 
        return a; 
      return gcd(b, a % b);  
    }  
    // To compute x^y under modulo m 
    static long power(long x, long y, long m){ 
        if (y == 0) 
            return 1;      
        long p = power(x, y / 2, m) % m; 
        p = (p * p) % m; 
      
        if (y % 2 == 0) 
            return p; 
        else
            return (x * p) % m; 
    }
    static long fast_pow(long base,long n,long M){
        if(n==0)
           return 1;
        if(n==1)
        return base;
        long halfn=fast_pow(base,n/2,M);
        if(n%2==0)
            return ( halfn * halfn ) % M;
        else
            return ( ( ( halfn * halfn ) % M ) * base ) % M;
    }
       static long modInverse(long n,long M){
        return fast_pow(n,M-2,M);
    }
    // (1,1)   

    //     (3,2)   (3,5)

}